Runtime components : Channels components : HTML Channel : Tasks : Configuring HTML Channel
  
Configuring HTML Channel
The following is an example of the entry in the toolkit configuration file (the server-side dse.ini file) for the configuration of the HTML Channel:
<!-- ======================================== -->
<!-- Client Devices -->
<!-- ======================================== -->
<!-- Associate "User Agents" from a client device to a reusable -->
<!-- channel handler. -->
<!-- "UserAgentFromSpecificCellularComsProvider" may be any -->
<!-- User Agent being used by existing devices in the market -->
<!-- belonging to any communications provider. -->
<!-- In this example, a channel handler named "wap" should be added -->
<!-- in the "channelHandlers" section. -->
<!-- If description="equals" then the "User Agent" coming in the -->
<!-- request must exactly match the specified id. -->
<!-- If description="contains" then the "User Agent" coming in the -->
<!-- request may just contain the specified id. -->
<!-- This feature allows the system to assign multiple versions of -->
<!-- a client device User Agent to a specific channelHandler. -->
<kColl id="devices">
<field id="UserAgentFromSpecificCellularComsProvider" value="wap"
description="equals"/>
<field id="WAPUserAgentv4.6.8" value="html" description="contains"/>
</kColl>
Multichannel support requires the specification of the request handler and the presentation handler. For the HTML Channel, these are normally com.ibm.btt.cs.html.HtmlRequestHandler and com.ibm.btt.cs.html.HtmlPresentationHandler respectively. The cookies setting is used to specify whether WebSphere Application Server performs the session management (true) or whether the toolkit performs session management internally (false). The runInSession setting defines whether the device type should run in session.
The following is an example of the entry in the dse.ini file for the configuration of the multichannel support channel for HTML clients:
<!-- ======================================== -->
<!-- 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="false"/>
<field id="runInSession" value="false"/>
</kColl>
</kColl>
In addition to configuring the HTML channel on the server-side, it is also necessary to set the attributes for how the HTML client handles this channel. The following is an example of the entry in the dse.ini file for HTML client handling:
<!-- ======================================== -->
<!-- HTML Clients -->
<!-- ======================================== -->
<kColl id="HTMLClient">
<field id="filePath" value="/dse/html/">
<field id="errorPage" value="error.jsp"/>
<field id="homePage" value="DesktopHtml.jsp"/>
<field id="startUpOp" value="startupHtmlServerOp"/>
<field id="minRequestResubmitTime" value="0"/>
</kColl>
HTML client attributes for multichannel support
filePath
A file path that is relative to the Web application server default Web path. The Web resources (typically JSP files) will be obtained from this path.
errorPage
The name of a JSP that will be displayed when a system exception occurs. When this page is displayed by the presentation handler, the exception itself will be saved in the request under the key name "exception" (In fact, the key name is saved symbolically as com.ibm.btt.cs.html.HtmlConstants.EXCEPTION).
homePage
Specifies the JSP that will build the HTML page that serves as the entry point to the application. This is the name of the JSP that will be used as the response page for CSEstablishSessionServlet. After the HTML client session has been established, the client will be presented with this page as the entry point to the Web application.
startUpOp
The name of the operation to be executed by CSEstablishSessionServlet when called by the Web browser client.
minRequestResubmitTime
Used to suppress duplicate requests from the client browser. Specifies the minimum amount of time in seconds that is allowed between request submissions from a given HTML page for an HTML channel session (effectively, from a particular Web browser). If the client user posts again from a page within the specified time, only the first request will be processed and the other posts will be responded to with a message and the result of the first one. This field is an optional field. It defaults to a value of zero seconds.
Go up to
Tasks