tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <>
Subject Re: altering the request URI in a filter
Date Mon, 02 Sep 2002 03:17:17 GMT

"jfc" <> wrote in message
> Hi,
> Tomcat 404, jdk1.3:
> Is it possible to alter the request's URI after authentication but
> before the request is delegated to a Struts action mapping?

The beauty of Filters is that anything is possible :-).  The Filter (at
least under Tomcat) will only be invoked after authentication, but before
the Struts servlet.

> I would like to be able to strip a string from the request URI which is
> there solely for the purposes of enforcing the web container to obtain
> authentication and authorization info. (if the web container's auth
> cache has been turned off).

You would need to wrap the Request with one that over-rides (at least)
getRequestURI, and getServletPath, and in some cases, getPathInfo (although,
since Struts uses extension mappings, the last one shouldn't apply in your

> Cheers
> jfc

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

View raw message