com.ibm.btt.cs.servlet
Class CSEstablishSessionServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.ibm.btt.cs.servlet.CSReqServlet
com.ibm.btt.cs.servlet.CSEstablishSessionServlet
- All Implemented Interfaces:
- ChannelDriver, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- Direct Known Subclasses:
- CSAssignServiceIdAndServerTIDProtocolServlet
- public class CSEstablishSessionServlet
- extends CSReqServlet
The CSEstablishSessionServlet extends CSReqServlet class
This servlet defines the front door for all devices supporting the HTTP protocol and should
be invoked to establish the session between the client and the server.
- See Also:
- Serialized Form
Method Summary |
protected java.lang.String |
getSessionId(ChannelContext aChannelContext)
Obtain the session id from the channel context. |
void |
preProcessRequest(ChannelContext channelContext)
Performs the session managment required to support HTTP and custom session management.
|
protected void |
service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Defines the process flow to execute a request. |
Methods inherited from class com.ibm.btt.cs.servlet.CSReqServlet |
createChannelContext, createChannelHandler, getDeviceType, getPresentationHandler, getRequestHandler, handleException, handleException, handleServerResponse, parseRequestData, parseRequestHeader, runInSession, updateChannelHandler, usingCookies |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CSEstablishSessionServlet
public CSEstablishSessionServlet()
- CSEstablishSessionServlet constructor.
preProcessRequest
public void preProcessRequest(ChannelContext channelContext)
throws DSECSSessionNotEstablishedException
- Performs the session managment required to support HTTP and custom session management.
This method updates the ChannelContext with the session and
must provide support for using cookies and hidden form field to manage the session.
- Create the session if the request is for a new session. The session is new if the header or the data contains a newsession tag with the value=true
- Create an HttpSession if using cookies or create a DSEChannelSession if not
- Create an entry in the sessions table for a new session
- Specified by:
preProcessRequest
in interface ChannelDriver
- Overrides:
preProcessRequest
in class CSReqServlet
- Parameters:
channelContext
- com.ibm.btt.clientserver.ChannelContext
- Throws:
DSECSSessionNotEstablishedException
- Thrown if the session has expired
getSessionId
protected java.lang.String getSessionId(ChannelContext aChannelContext)
- Obtain the session id from the channel context.
- Parameters:
aChannelContext
- com.ibm.btt.clientserver.ChannelContext
- Returns:
- java.lang.String
service
protected void service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
- Defines the process flow to execute a request. This method is the entry point for each
request coming to this servlet.
note This method is valid for requests sent using the GET method and requests sent using the POST method.
- Overrides:
service
in class CSReqServlet
- Parameters:
req
- HttpServletRequestres
- HttpServletResponse
- Throws:
javax.servlet.ServletException
java.io.IOException
(c) Copyright IBM Corporation 1998, 2005