tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <>
Subject Re: URL Rewrite
Date Sat, 04 Sep 2010 15:06:54 GMT
2010/9/4 michel <>:
> ----- Original Message ----- From: "Ognjen Blagojevic"
> <>
> To: "Tomcat Users List" <>
> 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:
For additional commands, e-mail:

View raw message