InfoCenter Home >
4: Developing applications >
4.2: Building Web applications >
4.2.1: Developing servlets >
4.2.1.3: Servlet content, examples, and samples >
4.2.1.3.3: Using page lists to avoid hard coding URLs >
4.2.1.3.3.1: Obtaining and using servlet XML configuration files (.servlet files) >
4.2.1.3.3.1.1: Extending PageListServlet

4.2.1.3.3.1.1: Extending PageListServlet

IBM WebSphere Application Server supplies the PageListServlet, the superclass of servlets that load pages contained in the page list element (<page-list>) of an XML servlet configuration file.

Implement a servlet that supports the use of XML configuration files (.servlet files) and page lists by extending the PageListServlet class.

The PageListServlet has a callPage() method that invokes a JavaServer Page in response to an HTTP request for a page in the page list.

The PageListServlet.callPage() method receives as input:

  • A page name from the page-list element of the XML configuration file
  • The HttpServletRequest object
  • The HttpServletResponse object

In structuring the servlet code, keep in mind that the PageListServlet.callPage() method is not an exit. Any servlet code that follows the callPage() method invocation will be run after the invocation.

See the Related information for an example of a servlet that extends the PageListServlet.

Go to previous article: Obtaining and using servlet XML configuration files (.servlet files) Go to next article: Example: Extending PageListServlet

 

 
Go to previous article: Obtaining and using servlet XML configuration files (.servlet files) Go to next article: Example: Extending PageListServlet