tomcat-users mailing list archives

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

"jfc" <jfc100@btopenworld.com> wrote in message
news:3D72598A.8010704@btopenworld.com...
> 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
case).

>
> Cheers
> jfc





--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message