tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: need to modify incoming get and post BEFORE sent on to servlets
Date Tue, 04 Dec 2001 22:55:16 GMT
*** PLEASE *** ask user questions like this on the TOMCAT-USER list
instead of here!

On Tue, 4 Dec 2001, masukomi wrote:

> Date: Tue, 4 Dec 2001 17:44:26 -0500 (EST)
> From: masukomi <>
> Reply-To: Tomcat Developers List <>
> To:
> Subject: need to modify incoming get and post BEFORE sent on to servlets
> I need to write a little app that will catch all incoming GETs and
> POSTs check where they are going, and alter it if it matches a cached
> alias (which could be updated by any servlet that wanted to send it a
> message with new info).
> I would like to write this so that it can work on anyones system not
> just with my other servlets.
> i would like to result to work like this
> -tomcat gets a request
> -get string is analized and maybe modified
> -tomcat ships it off to whatever page or servlet should process it as if the url
>   had never been modified.
> I'm hoping there is a way to do this without actually modifying tomcat
> or having to use "Location:" redirects but I haven't seen anything.
> And "Context" assumes you know what should handle it. Preferably this
> would be a simple black box that anyone can install with a public
> method that allows other apps to notify it about new or modified
> aliases. This way it can store aliases in a db or a flat file or
> change any aspect of how the aliases are managed or cached without
> people needing to alter their apps.
> basically I'm wondering where my code needs to go to acheive this and
> where i shoudl go to find info on that (if it's not obvious).
> -kate

In a Servlet 2.3 based environment (like Tomcat 4), this kind of thing can
be done with a Filter.  Otherwise, you're going to be stuck with
Tomcat-specific extensions (a RequestInterceptor for 3.x or a Valve for

Craig McClanahan

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

View raw message