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

StandardHostValve

This valve encapsulates the basic behavior of the StandardHost. It has two primary responsibilities:

  • It invokes the pipeline of the appropriate Context to process the request
  • It handles any exceptions that occur during the processing of the request

This valve's invoke() method first obtains the Context associated with the incoming Catalina Request.

It then sets the context class loader of the current Thread to the ClassLoader associated with that Context. This ensures that any class loading will occur in the context of the selected web application, and so will get a view of the world as described by the WEB-INF/lib and WEB-INF/classes folders of that application.

It then invokes the pipeline associated with that Context as follows: ...

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