tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: Custom Valves and Administration Tool
Date Wed, 11 Dec 2002 01:34:16 GMT

On Wed, 11 Dec 2002, Jon Eaves wrote:

> Date: Wed, 11 Dec 2002 09:38:48 +1100
> From: Jon Eaves <>
> Reply-To: Tomcat Users List <>
> To: Tomcat Users List <>
> Subject: Custom Valves and Administration Tool
> Hi all,
> Thanks to Bill Barker, my custom valves now are installed happily
> within Tomcat and are valving away nicely without spewing MBean
> exceptions into the log.
> I was hoping to manage the valves via the Administration tool.
> Q1. Is this possible ?

Yes, with some work.

> Q2. Do I have to modify the Admin tool ?

Yes.  You'll need to add JSP pages, a form bean, and the appropriate set
of Actions (the admin webapp is based on Struts) for your custom Valve's
properties, plus tweak the generic code for things like "add valve" to
make your type of valve an option on the list.

> Q3. How do I configure it ? (what needs to be in server.xml ?)

It's not really a matter of configuration -- the admin tool has specific
logic for each specific type of component that it supports.  The only
reasonably generic part is building the initial tree from the components
actually running inside Tomcat (which was in turn based on the original
contents of server.xml), and saving the updated set of components actually
running back to the server.xml file.

> I would have thought it was possible, as the Admin tool appears
> to parse the server.xml and generate stuff based on that, and my
> Valves have implemented the LifecycleListener interfaces so I'm
> a tad confused about where to go from here.

Ideally, the admin tool would be completely generic -- you could add your
custom components (perhaps along with a description of how they fit in in
some sort of XML file), and the admin tool would automatically build the
required screens and functionality.  IMHO, implementing this ideal in a
completely generic way is somewhere between very difficult and not
feasible if you want to end up with a high quality UI, but assistance in
doing this would be welcomed.

> Cheers,
> 	-- jon
> PS: I've said it before, and I'll say it again, the documentation
> in Tomcat for general users/administrators is first rate. This
> stuff is a bit thin, but what they heck, most people don't need
> or want to do this.
> --
> Jon Eaves <>


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message