Hello,
is really cutting of the /myapp the thing you want to do? Isn't it turned-up?

Now from url http://myip/myapp/smthg
you redirect client to
http://myip/smthg

You wrote : "In one of the servlets POST method i am redirecting the request to a JSP page"
So the scenatio is.
1. client makes a POST request to a servlet
2. The servlet returns Redirect in the response. And there you need to compute the url to redirect to.
If you use only relative url, you should not have this problem.
If you need full url, you should use mod_ajp or read the hostname:port part from configuration.
But there is no need to define Redirect in Apache Server config.

Jan.
Hi



I am very new to mod_proxy. Gone thru some tutorials and configured mod_proxy. 
Everything works great except this issue. Couldn't solve even after spending 
hrs in googling. Issue is - I have apache 2 in front of tomcat 6 (running in 
port 8080) in my internet website. I am using mod_proxy to mask the port 8080. 
In one of the servlets POST method i am redirecting the request to a JSP page 
but port 8080 is displayed in the URL as follows after successful redirect 
http://myip.com:8080/myapp/WebContent/result.jsp?message=success
Couldn't figure out how to avoid it. Here is my httpd conf entry
<VirtualHost *:80> ServerAdmin sha...@example.com ServerName http://myip 
ServerAlias http://myip ProxyPass /myapp http://myip:8080/myapp ProxyPassReverse 
/myapp myip:8080/myapp ProxyPass /myapp ! RedirectMatch 301 ^/myapp/(.*)$ /$1 
RedirectMatch 301 ^/myapp$ /
</VirtualHost>
Can someone pls. let me know what the problem is? thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to