Runtime tools : Channels components : HTML Channel : Tasks : Using cookies to maintain session identity
  
Using cookies to maintain session identity
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 (dse.ini). 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.
To enable the use of cookies to maintain session identity, you must modify the toolkit configuration file. In the "html" kColl tag of the "channelHandlers" kColl tag, locate the field tag with the "cookies" id attribute and set the value of the value attribute for this field tag to "true" as shown below:
<!-- ======================================== -->
<!-- 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>
Go up to
Tasks