|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.jcorporate.expresso.core.servlet.StdServlet
com.jcorporate.expresso.core.servlet.DBServlet
A Servlet set up to have access to a relational database from the server side. This is a base class for all database maintenance and reporting servlets
| Field Summary | |
protected static String |
thisClass
|
| Fields inherited from class com.jcorporate.expresso.core.servlet.StdServlet |
mySchema |
| Constructor Summary | |
DBServlet()
|
|
| Method Summary | |
void |
destroy()
Implemented for when the context is unloaded. |
void |
doGet(HttpServletRequest request,
HttpServletResponse response)
Ancestor calls this function (with super.doGet) to handle making database connection, getting user login info and other common tasks |
void |
doPost(HttpServletRequest req,
HttpServletResponse res)
Ancestor calls this method via super.doPost to handle standard operations |
protected String |
getDBName(HttpServletRequest request)
Return the "alternate" database name, if one is set. |
void |
init(ServletConfig sc)
Standard Servlet init() function |
boolean |
requireLogin(HttpServletRequest req,
HttpServletResponse res,
String nextURL)
Deprecated. does nothing but return false; |
protected void |
setDBName(String newDBName,
HttpServletRequest req)
Set the "alternate" database name |
void |
setSkipLogin(boolean newSkip)
|
void |
setupChannels(HttpServletRequest req)
Set up the logging channels for all DBServlets |
| Methods inherited from class com.jcorporate.expresso.core.servlet.StdServlet |
getSchema, getServerName, getServerPort, getServletPrefix, getServletPrefix, getString, getString, getTitle, handleParam, setSchema, showError, showError |
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final String thisClass
| Constructor Detail |
public DBServlet()
| Method Detail |
public void init(ServletConfig sc)
throws ServletException
init in interface Servletinit in class StdServletsc - The servlet Configuration passed by the web.xml file
ServletExceptionpublic void destroy()
destroy in interface Servletdestroy in class StdServlet
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
doGet in class StdServletrequest - Standard request objectresponse - Standard response object
ServletException - If an uncaught exception occurs
IOException - If an I/O error communicating with the client occurs
public void doPost(HttpServletRequest req,
HttpServletResponse res)
throws ServletException,
IOException
doPost in class StdServletreq - Standard request objectres - Standard response object
ServletException - If an uncaught exception occurs
IOException - If an I/O error occurs communicating with the clientprotected String getDBName(HttpServletRequest request)
request - The servlet request
public boolean requireLogin(HttpServletRequest req,
HttpServletResponse res,
String nextURL)
throws IOException,
ServletException,
DBException,
LogException,
HtmlException
req - Standard request objectres - Standard response objectnextURL - to proceed with when login completed successfully
IOException - If an I/O error occurs communicating with the client
ServletException - If an uncaught exception occurs
DBException - If a problem occurs accessing login
information in the database
LogException
HtmlException
protected void setDBName(String newDBName,
HttpServletRequest req)
throws ServletException
newDBName - The new data context to set the session forreq - the servlet request object
ServletExceptionpublic void setSkipLogin(boolean newSkip)
newSkip - set to true if you want login processing skipped
public void setupChannels(HttpServletRequest req)
throws ServletException
req - The servlet request object
ServletException
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||