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.4: Filtering and chaining servlets >
4.2.1.3.4.2: Servlet filtering with servlet chains

4.2.1.3.4.2: Servlet filtering with servlet chains

To configure a servlet chain, you must use an IBM supplied servlet named com.ibm.websphere.servlet.filter.ChainerServlet

  1. Add the com.ibm.websphere.servlet.filter.ChainerServlet to your Web application during the application assembly stage and assign a servlet URL to the servlet instance.
  2. Define the following initialization parameter and value for the ChainerServlet:
    Parameter Value
    chainer.pathlist /first_servlet_URL /next_servlet_URL

    The chainer.pathlist is a space-delimited list of servlet URLs. For example, if you want the sequence of servlets to be three servlets that you added to the examples application (servletA, servletB, servletC), specify:

    Parameter Value
    chainer.pathlist /servletA /servletB /servletC
  3. To invoke a servlet chain, invoke the servlet URL of the ChainerServlet in your application.

Go to previous article: Servlet filtering with MIME types Go to next article: Enhancing servlet error reporting

 

 
Go to previous article: Servlet filtering with MIME types Go to next article: Enhancing servlet error reporting