java - nginx affects request value
阿神
阿神 2017-05-16 17:06:55
0
1
388

After passing the nginx proxy, the value of request.getSession(true).getServletContext() is null. If you directly access tomcat with IP and port, you can get the path. Is there any expert who has encountered this problem?
someone said:

proxy_set_header       Host $host;   //解决getRequestURL、getServerName、getServerPort

But proxy_set_header has been added

阿神
阿神

闭关修行中......

reply all(1)
伊谢尔伦

Try using request.getServletContext()

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!