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 Tue, 03 Sep 2002 13:26:19 GMT
Martin Cooper wrote:

>
>>-----Original Message-----
>>From: jfc [mailto:jfc100@btopenworld.com]
>>Sent: Monday, September 02, 2002 1:51 AM
>>To: Tomcat Users List
>>Subject: Re: altering the request URI in a filter
>>
>>
>
>[snip]
>
>>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.
>>
>
>Since you're the one implementing the wrapper class, you can choose to add
>whatever methods you see fit.
>
>--
>Martin Cooper
>
>
>>jfc
>>
>>
>>
>>--
>>To unsubscribe, e-mail:   
>><mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>>For additional commands, e-mail: 
>><mailto:tomcat-user-help@jakarta.apache.org>
>>
>>
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
>
>
Hi Martin,

If I create a request wrapper, I can add whatever state and accessor or 
other methods which may be useful to some other process that knows that 
they are there. What I am really asking is this:

Because I am using struts, I have a ActionServlet and a request 
processor which based on the request's stored URI, locates a mapping 
which is defined in struts-config.xml and this mapping directs to a 
handler (my action class). I want to be able to change the URI (the one 
which the framework uses to locate the mapping) so that a different 
mapping will be selected.

So I'm not talking about adding specific behaviour or state to the 
request - I want to access the existing state and modify it and have the 
framework go about it's usual business of doing the delegating to my 
action etc (based on the updated state).

It is possible to override the ActionServlet and/or the request 
processor in struts which may or may not be neccessary - depending on 
what can be achieved from a filter.

So I want to know where I could alter the request URI with this change 
being visible to what ever processes the request to select the struts 
mapping.


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