By default, the HTML Channel does not use cookies stored by the HTML browser on the client side to identify an HTML client session. However, this option does exist and it can be enabled by a setting in the toolkit configuration file (btt.xml). When the toolkit is set to use cookies, the client HTML browsers must also support cookies. With cookies enabled, the Web application can use the HttpSession support provided by the Web application server and the javax.servlet API. To pass through the default session management provided by the toolkit, the request handler should be extended.
The hidden fields on forms, including the sessionId field, must be maintained even when cookies are enabled. This ensures that the hidden field values are available internally to the toolkit as part of the context. The sessionId field is not used to maintain the session identity, but it is still used internally by the toolkit.
If cookies support is enabled, an HttpSession object is created when the session is established. The toolkit can be extended to get access to this object.
<!-- ======================================== --> <!-- Channel Handlers --> <!-- ======================================== --> <kColl id="channelHandlers"/> <kColl id="html"/> <field id="requestHandler" value="com.ibm.btt.cs.html.HtmlRequestHandler"/> <field id="presentationHandler" value="com.ibm.btt.cs.html.HtmlPresentationHandler"/> <field id="cookies" value="true"/> <field id="runInSession" value="false"/> </kColl> </kColl>