tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfc <jfc...@btopenworld.com>
Subject Re: altering the request URI in a filter
Date Mon, 02 Sep 2002 08:51:26 GMT
Bill Barker wrote:

>"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>
>
>
Hi,

Thanks for the reply. How can I actually set the new value/s on the 
request? I don't see any setter methods or any fields which can be used 
to hold the new value.

The only setters I can see are setAttribute and setRequest.

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