You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ying lcs <yi...@gmail.com> on 2006/12/13 04:03:38 UTC
tomcat 5.0 context redirect
Hi,
I notice some strange feature in tomcat 5.0.
If i have a url like this http://localhost:8080/mytestapp?qa=1,
it will be redirected to http://localhost:8080/mytestapp/?qa=1,
in order words, "context" is automatically redirected to "context/".
Can you please tell me why tomcat 5.0 does it? i don' t notice the
same thing in tomcat 4.1?
And if there is a way to disable this feature? I think this redirect
is done via HTTP 302. And i would like to minimize http traffic.
thank you.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: tomcat 5.0 context redirect
Posted by Reinhard Moosauer <rm...@moosauer.de>.
Hi,
you can mimimize http traffic by correctly linking to
http://localhost:8080/mytestapp/?qa=1 (with the slash)
Please consider that "mytestapp" should be seen as a directory by the browser.
And your first url is wrong (strictly speaking), so Tomcat tries to fix it by
a redirect.
I see no reason to change the current behavior. Better fix your application.
Kind regards,
Reinhard
Am Mittwoch, 13. Dezember 2006 04:03 schrieb ying lcs:
> Hi,
>
> I notice some strange feature in tomcat 5.0.
>
> If i have a url like this http://localhost:8080/mytestapp?qa=1,
> it will be redirected to http://localhost:8080/mytestapp/?qa=1,
>
> in order words, "context" is automatically redirected to "context/".
>
> Can you please tell me why tomcat 5.0 does it? i don' t notice the
> same thing in tomcat 4.1?
>
> And if there is a way to disable this feature? I think this redirect
> is done via HTTP 302. And i would like to minimize http traffic.
>
> thank you.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org