You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "David.Meldrum" <da...@verizon.net> on 2008/11/10 21:24:51 UTC
URL Mapping behind a router
I am deploying my tomcat server behind a router. I have the router port
forwarding working and I can hit the top index.html page fine. My
problem is that when I try to redirect to a JSP's or html page. Tomcat
changes the url address from the original which was really the routers
name to the localhost's name, which will not work from outside the LAN.
Example:
router name: MyName.org
Tomcat host name: Server
So from the outside a URL like http://MyName.org:8080/ goes thru the
router and lands on Server:8080 as it should and things work fine. Now
within the application there is a redirect to: /project/MyJSP. Tomcat
rewrite this as:
http://Server:8080/project/MyJSP, but it needs to be:
http://MyName.org:8080/project/MyJsp. In other words Tomcat is changing
the URL to be the name of the server (as defined by the OS), not the
original URL.
My server.xml contains:
<Engine name="Catalina" defaultHost="MyName.org">
and
<host name="MyName.org" appbase=webapps"
...
...
</host>
Any ideas where I am going wrong?
-d
---------------------------------------------------------------------
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: URL Mapping behind a router
Posted by "David.Meldrum" <da...@verizon.net>.
As Gilda Radner would say NEVER MIND! I had some absolute paths in my
hrefs instead of relative paths. Shame on me!
-d
David.Meldrum wrote:
> I am deploying my tomcat server behind a router. I have the router
> port forwarding working and I can hit the top index.html page fine.
> My problem is that when I try to redirect to a JSP's or html page.
> Tomcat changes the url address from the original which was really the
> routers name to the localhost's name, which will not work from outside
> the LAN.
>
> Example:
> router name: MyName.org
> Tomcat host name: Server
>
> So from the outside a URL like http://MyName.org:8080/ goes thru the
> router and lands on Server:8080 as it should and things work fine.
> Now within the application there is a redirect to: /project/MyJSP.
> Tomcat rewrite this as:
> http://Server:8080/project/MyJSP, but it needs to be:
> http://MyName.org:8080/project/MyJsp. In other words Tomcat is
> changing the URL to be the name of the server (as defined by the OS),
> not the original URL.
>
> My server.xml contains:
> <Engine name="Catalina" defaultHost="MyName.org">
> and
> <host name="MyName.org" appbase=webapps"
> ...
> ...
> </host>
>
> Any ideas where I am going wrong?
> -d
>
>
> ---------------------------------------------------------------------
> 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