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 processing

As we saw in the last chapter, the context's basic valve first notifies any ServletRequestListener instances by invoking their requestInitialized() method, and then calls invoke() on the servlet wrapper's pipeline.

A wrapper's pipeline, by default, only has a single valve, the StandardWrapperValve. It calls its wrapper's allocate() method to obtain an instance of its wrapped servlet to process the incoming request.

If this is a normal servlet (that is, it does not implement the deprecated SingleThreadModel interface), then there will always be only one instance of a given servlet per wrapper, and it is this instance that is returned to service every incoming request for this servlet.

While servlets that are marked to be loaded ...

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