The client_types.xml file provides client type detection support for servlets extending PageListServlet. Using the configuration data in the client_types.xml file, servlets can determine the language type that calling clients require for the response.

The client type detection support allows servlets to call appropriate JSP (JSP) files with the callPage() method. Servlets select JSP files based on the markup-language type of the request.

Servlets must use the following version of the callPage() method to determine the markup language type required by the client...

callPage String(mlName, String pageName, HttpServletRequest request, 
                  HttpServletResponse response)

where the arguments are...

Review the Extending PageListServlet code example to see how the callPage() method is invoked by a servlet.

In the example, the client type detection method, getMLTypeFromRequest(HttpServletRequestrequest), provided by the PageListServlet, inspects the HttpServletRequest object request headers, and searches for a match in the client_types.xml file.

The client type detection method does the following...



The client_types.xml file is located in the $WAS_HOME/properties directory.


Usage notes


Sample file entry

<?xml version="1.0" >
<!DOCTYPE clients [
<!ELEMENT client-type (description, markup-language,request-header+)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT markup-language (#PCDATA)>
<!ELEMENT request-header (name, value)>
<!ELEMENT clients (client-type+)>
<!ELEMENT value (#PCDATA)>]>
      <description>IBM Speech Client</description>
           <value>IBM VoiceXML pre-release version 000303</value>
           <description>WML Browser</description>


See Also

Page lists
Client type detection support
Webapplications: Resources for learning