`

Nginx反向代理不跳转(nginx/java/tomcat/jsp)

阅读更多
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
 
<head>
    <base href="<%=basePath%>">
</head>

 

在配置nginx和tomcat时,发现页面无法跳转,但是直接访问页面地址,发送post/get数据都是ok的。最后firebug跟踪发现是Myeclipse中代码生成的上面代码有关。直接将跳转地址定位到本机ip。删除后,跳转正常。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics