Hi all.
My Spring MVC application is runnning on a Tomcat behind an Apache 2 acting as a proxy. I access my app directly in tomcat via an url like http://localhost:8080/myapp
. I access my app via proxy with an url like http://localhost/tomcat/myapp
.
The second url makes my app behave incorrectly, because it supposes it lives in /myapp
context path, but via the proxy it should live in /tomcat/myapp
.
Is there a variable in Spring or Servlet API, that holds /tomcat/myapp
if I am accessing it via the proxy, and /myapp
if I am accessing it directly?
Thanx