首頁 > 問答 > 主體
透過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()試試看