O'Reilly logo

Tomcat 6 Developer's Guide by Damodar Chetty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Request dispatcher

When a request is received by a servlet, it may choose to either generate the response itself, relinquish processing to another servlet (known as forwarding), or request one or more other servlets to generate portions of the complete response (known as including).

The servlet container provides the request dispatcher mechanism in order to allow a servlet to engage other servlets in generating a response.

A few important rules apply to the process of dispatching a request:

  1. A servlet forwards a request when it is either not interested or not able to generate the response. In this case, it wholly delegates request processing to the forwarded servlet. Any output written by the original servlet is flushed.
  2. Attributes added to a request ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required