tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Bertelsen <bertelsen.e...@gmail.com>
Subject Re: response.encodeURL("http://localhost:8080") produces an invalid URL?
Date Wed, 29 Jun 2011 15:49:07 GMT
2011/6/29 Konstantin Kolinko <knst.kolinko@gmail.com>:

>
> From HTTP standpoint it should be http://localhost:8080/ and in my
> experience browsers add the trailing slash automatically. I have not
> looked whether the actual HTTP spec is more strict regarding such
> URLs.
>

Actually my experience is slightly different, i.e. the HTTP servers
send a redirect which adds the trailing /.

In a tomcat context, this actually may make an important difference:
If you connect directly to an HTTP port on a tomcat with an URL like
http://server:8260/app where app is an webapp running in this tomcat's
webapps directory, the browser will be directed to
http://server:8260/app/

If you have a JkMount in an apache httpd server mapping
http://server/app/* to http://tomcat-server:someport/app/* then
suddenly the trailing / is necessary in the initial browser url to
reach the app's front page.

regards
- Erik

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message