开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜