首页 > 问答 > 正文
通过nginx代理后,request.getSession(true).getServletContext()取值为null,直接ip加端口访问tomcat却可以取到path,求问哪位大神有没有遇到过这个问题?有人说:
proxy_set_header Host $host; //解决getRequestURL、getServerName、getServerPort
但是proxy_set_header已经加了
伊谢尔伦2017-05-16 17:08:55
你用request.getServletContext()试试呢