2010/9/4 michel <compu...@videotron.ca>:
> ----- Original Message ----- From: "Ognjen Blagojevic"
> <ognjen.d.blagoje...@gmail.com>
> To: "Tomcat Users List" <users@tomcat.apache.org>
> Sent: Friday, September 03, 2010 6:42 AM
> Subject: Re: URL Rewrite
>
>
>> On 3.9.2010 12:02, michel wrote:
>>>
>>> I have been using the tuckey urlrewrite with some results, in that if I
>>> want to have an incoming URL coming in as
>>> gallery/pic20 gets changed to gallery.jsp?pic=20
>>> But the tool bar URL gets displayed as   gallery.jsp?pic=20
>>> and I want to display  gallery/pic20
>>
>> Just use rule, not outbond-rule:
>>
>> <rule>
>>  <from>/gallery/pic([0-9]+)</from>
>>  <to>/gallery.jsp?pic=$1</to>
>> </rule>
>
> Thanks, and I have it working at times (worked all day on this) but it seems
> unreliable. I am expecting that the very same code would work if I had
> 'forward' or 'redirect', but it doesn't.
>

If you need a filter to be invoked not only on user's requests, but
also when processing forwards and includes inside of your own webapp,
you have to configure its mapping in web.xml so that those are passed
to it. See the Servlet spec for details.

If that is what you mean by forwards and redirects.

If you do a client-side redirect (sending a response with HTTP status
302 or 301, 303, 307), the URL where you sent your client will be
displayed in her browser's location bar.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to