Page lists

Page lists allow you to avoid hardcoding Uniform Resource Locators (URLs) in servlets and JavaServer Pages (JSP) files. A page list specifies the location where a request is to be forwarded, but automatically tailors that location depending on the MIME type of the servlet. These properties allow you to specify a markup language and an associated MIME type. For the given MIME type, you also specify a set of pages to invoke.

WebSphere Application Server - Express supplies the PageListServlet, which you can use to call a JSP file by name based on the configuration data in the client_types.xml file. This file maps a JSP file to a Uniform Resource Identifier (URI). When the URI is invoked, it specifies another JSP file in a Web module. This support allows you to access multiple URLs without hard-coding them in your servlets.

You can also logically group page lists according to the markup language type, as for example, HTML or Wireless Markup Language (WML). This allows applications, using servlets that extend the PageListServlet, to call JSP files that return the proper markup-language type for the client request. For example, if a request originates from a PDA device that requires WML data and is sent to a servlet that extends the PageListServlet, the servlet can call a JSP file that returns a WML response.

You can define PageListServlet configuration information in the IBM Web Extensions file. The IBM Web Extensions file is created and stored in the Web Applications archive (WAR) file.

In addition to providing the page list mapping capability, the PageListServlet also provides Client Type Detection support. A servlet determines the markup language type that a calling client needs in the response, using the configuration information in the client_types.xml file. For more information, see client_types.xml.

Client type detection support allows a servlet, extending the PageListServlet, to call an appropriate JSP file. The servlet invokes the callPage() method, which calls a JSP file based on the markup-language type of the request.

Example: Extending PageListServlet
See this topic for an example of how to extend the PageListServlet class.