Runtime components : Channels components : HTML Channel : Concepts : Session establishment
  
Session establishment
The server toolkit application can be initialized (automatically during the application server startup sequence or from an HTML client) by using the StartServerServlet after the Web application server has been started.
After the toolkit application has been initialized, the HTML client can connect to the server using the CSEstablishSessionServlet class. This class does the following:
1 Gets the device type
2 Creates the ChannelContext
3 Parses the RequestHeader
4 Parses the RequestData
5 Performs the session management to support custom and HTTP sessions
6 Updates the ChannelContext with the session
7 Provides support for using cookies and hidden input fields
8 Determines the appropriate request handler (in this case, HtmlRequestHandler) and requests that it process the session request
To process the session request, the HtmlRequestHandler does the following:
Creates the operation for the session startup as defined in the startupOp element of the HtmlClient KeyedCollection of the btt.xml file
Adds the dse_replyPage hidden input field to the operation context with the value specified under the homePage element of the HtmlClient KeyedCollection of the btt.xml file
Adds the dse_sessionId hidden input field to the operation context with the session ID as defined by the CSEstablishSessionServlet
Runs the operation
Gets the sessionId
Adds the session context to the table of sessions managed by the CSSessionHandler
Adds the hidden input fields that are required for all standard requests
The execute method of the startup operation does the following:
Creates the session context by ContextFactory.createContext("htmlSessionCtx", true)
Chains the session context to the root context
The client browser shows HTML pages that have been rendered by JSPs. The user's actions are sent as HTTP requests to the server. The server replies with HTML to be displayed in the browser.
After the first request to the server, any subsequent requests from the client include the fields that were returned from the server in the previous response. Therefore, the fields that are required in a request for executing operations are dependent upon what has been sent previously. Remember that an HTML page on the client workstation contains what the server has built as a response to a previous request.
The HTML page rendered by a JSP can contain simple data fields or complex data such as indexed collections. Other than application fields, there are some mandatory hidden fields that need to be present in any HTML request. These must have been returned to the client in the previous HTML response from the server. See Populating the response page with the required fields.
Go up to
Concepts