Problem with HttpServletRequest & Apache
when i tried to get the requested url on some page on myapp.com i get something like : http://127.0.0.1:8084/myapp/mypage
and it was expected to be: http://myapp.com/mypage
i think that this is because Apache acts as a Mediator between the tomcat and the user requests/responses
any ideas guys why such behaviour occu开发者_如何学JAVArs, and how to fix it ? thanks
How are you connecting your Apache to your Java Application server?
If you are using a plain reverse proxy (mod_proxy), what you are getting is what's expected. You won't be able to change that because of reverse proxy's nature.
On the other hand, if you are using AJP (with mod_ajp, or mod_jk) you should be getting http://myapp.com/mypage.
My suggestion is, change to AJP if you are using a plain reverse proxy.
精彩评论