|
OpMath | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--javax.servlet.http.HttpServlet
|
+--com.opmath.util.http.HttpServlet
|
+--com.opmath.util.http.HttpSessionServlet
Provides an abstract class for a session servlet.
The structure and functionality of this class is identical to its superclass,
with the difference that it makes use of the HttpSession instance
valiable, and instantiates this variable before calling
doGetDispatch(HttpServletRequest) or
doPostDispatch(HttpServletRequest).
NOTE: Application servlets that require protected or log on functionality for
their sessions should subclass com.opmath.util.http.HttpProtectedServlet,
and not this class.
WARNING: It is up to the programmer to ensure that the use of the HttpSession
instance variable (or any other instance variable) has thread safety.
Copyright: (c) 2002 The Open Math Company Limited
The Terms of Distribution of this software are stipulated in the javadoc Overview for this project.
HttpServlet,
HttpLogOnServlet,
HttpLogOffServlet,
HttpProtectedServlet, Serialized Form| Fields inherited from class com.opmath.util.http.HttpServlet |
EOL, LOGON_DONE, LOGON_TARGET |
| Constructor Summary | |
HttpSessionServlet()
|
|
| Method Summary | |
void |
doGet(HttpServletRequest req,
HttpServletResponse rsp)
Handles an HTTP GET request. |
protected String |
doGetDispatch(HttpServletRequest req,
HttpSession session)
Services an HTTP GET request, as caught by the doGet(HttpServletRequest, HttpServletResponse) method on this
class. |
void |
doPost(HttpServletRequest req,
HttpServletResponse rsp)
Handles an HTTP POST request. |
protected String |
doPostDispatch(HttpServletRequest req,
HttpSession session)
Services an HTTP POST request, as caught by the doPost(HttpServletRequest, HttpServletResponse) method on this
class. |
String |
getServletInfo()
Returns a String carrying some information about the servlet. |
| Methods inherited from class com.opmath.util.http.HttpServlet |
doGetDispatch, doPostDispatch, getIndex, getParamIndex, getValueCount, paramIndices, paramMappings, paramNames, paramValues, registerIndex, registerIndices, report, setConfig, setConfig |
| Methods inherited from class javax.servlet.http.HttpServlet |
|
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.opmath.util.http.ParamIndex |
getIndex, getParamIndex, getValueCount, paramIndices, paramMappings, paramNames, paramValues, registerIndex |
| Constructor Detail |
public HttpSessionServlet()
| Method Detail |
public void doGet(HttpServletRequest req,
HttpServletResponse rsp)
throws ServletException,
IOException
Handles an HTTP GET request.
This method instantiates the session object of the servlet, then arranges that
the doGetDispatch(com.opmath.util.http.HttpServletRequest, HttpSession session)
method is invoked.
doGet in class HttpServletreq - a javax.servlet.http.HttpServletRequest
carrying the request environmental variables.rsp - a javax.servlet.http.HttpServletResponse
carrying the response objects.ServletException - if the method encounters any method-internal error.IOException - if one of the method's resources could not be used.doGetDispatch(com.opmath.util.http.HttpServletRequest,
HttpSession session)
protected String doGetDispatch(HttpServletRequest req,
HttpSession session)
throws Exception
Services an HTTP GET request, as caught by the
doGet(HttpServletRequest, HttpServletResponse) method on this
class. This method should be overriden by any real-world application.
req - an com.opmath.util.http.HttpServletRequest
created by doGet(HttpServletRequest, HttpServletResponse).session - a HttpSession
carrying the session.String carrying the report.Exception - if a subclass's method encounters any error state.doGet(HttpServletRequest, HttpServletResponse)
public void doPost(HttpServletRequest req,
HttpServletResponse rsp)
throws ServletException,
IOException
Handles an HTTP POST request.
This method instantiates the session object of the servlet, then arranges that
the doPostDispatch(com.opmath.util.http.HttpServletRequest, HttpSession session)
method is invoked.
doPost in class HttpServletreq - a javax.servlet.http.HttpServletRequest
carrying the request environmental variables.rsp - a javax.servlet.http.HttpServletResponse
carrying the response objects.ServletException - if the method encounters any method-internal error.IOException - if one of the method's resources could not be used.doPostDispatch(com.opmath.util.http.HttpServletRequest,
HttpSession session)
protected String doPostDispatch(HttpServletRequest req,
HttpSession session)
throws Exception
Services an HTTP POST request, as caught by the
doPost(HttpServletRequest, HttpServletResponse) method on this
class. This method should be overriden by any real-world application.
req - an com.opmath.util.http.HttpServletRequest
created by doGet(HttpServletRequest, HttpServletResponse).session - a HttpSession
carrying the session.String carrying the report.Exception - if a subclass's method encounters any error state.doPost(HttpServletRequest, HttpServletResponse)public String getServletInfo()
String carrying some information about the servlet. This method should be
overridden by any subclass.
getServletInfo in class HttpServletString describing the class.
|
OpMath | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||