tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Weiss <>
Subject Re: request interrupt
Date Mon, 02 Oct 2000 03:43:04 GMT
jason watkins wrote:
> > With the servlet 2.2 API (i.e. any Tomcat 3.x version), the only way you
> > will be
> > able to do this inside Tomcat (you might see if there is an Apache
> > module that
> > does what you want if you are running Tomcat behind Apache) is to map
> > all
> > requests for your app to a particular servlet, and then teach your
> > servlet how
> > to forward the request on to the appropriate "real" servlet or JSP page.
> > Depending on the details of how your request URIs are set up, this can
> > be pretty
> > intricate to set up.
> This is what I feared, and also what I did with PHP. So, I think I'll write
> a logger servlet, and just manually call it from the end of every
> page/servlet for the meantime.
> > With the servlet 2.3 API (i.e. Tomcat 4.0), you will be able to do
> > things like
> > this with the new Filter API, which lets you insert processing elements
> > into the
> > servlet container's processing stream, independent of the servlets that
> > ultimately get invoked.  In this scenario, what you want to do should be
> > pretty
> > easy.  For example, one of the example filters in Tomcat 4.0 is a
> > debugging aid
> > that just dumps out all the request headers to a log file.  All you have
> > to do
> > is configure this filter to watch the URI patterns you are interested
> > in, with
> > no changes to the rest of the webapp.
> awsome, this is totally nessisary!
> any ETA on when Tomcat 4.0 and the 2.3 spec are going to move to ready for
> prime-time?

I've accomplished this by a slightly different approach, which seems to
work pretty well (although it may require a little more work). I just
created my own version of (i.e.,,
and added debugging and authentication code (and whatever other
functionality I want available to all JSPs). Then I just have all JSPs
extend that base class and they can call whatever specific code I need
(open source is nice :).

I did the same thing for servlets- create a base class which all our
servlets extend. I think I prefer having control over this kind of stuff
in my own code, seems like it would be more portable but I'm sure

Steve Weiss      Association of American Medical Colleges

View raw message