This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Valve Processing in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Valve Processing in Tomcat" Watch "Valve Processing in Tomcat" New topic

Valve Processing in Tomcat

Mohit Vashishta

Joined: Mar 24, 2008
Posts: 7
Hi All,

Can anyone throw some light on valve processing done by Tomcat as a part of Request processing?

Thanks in advance any help will be highly appreciated.

Ben Souther

Joined: Dec 11, 2004
Posts: 13410

I would start by reading this:

Then I would go through the configuration documentation to see how to configure a valve a the Engine, Host, or Context level.
Then, if I were still interested in writing one, I would take a look a the source code to the pre-written valves that ship with Tomcat and are covered in this page.

If you tell us what you're trying to accomplish, someone might be able to offer another alternative.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Mohit Vashishta

Joined: Mar 24, 2008
Posts: 7
Thanks Ben for your reply.

I'm trying to upgrade from Tomcat 5.0 to Tomcat 5.5 which has been written in embedded mode.The Problem I'm facing is that my application uses an interface ValveContext which is missing from Tomcat 5.5. Any idea how can i get this functionality (provided by ValveContext) with Tomcat5.5.

The invokeNext(request,respone) method of ValveContext interface is used to invoke next valve in the pipeline.

Don't get me started about those stupid light bulbs.
subject: Valve Processing in Tomcat
It's not a secret anymore!