我在系统的hosts 文件里配置了
127.0.0.1 localhost
127.0.0.1 域名
当用localhost 和IP访问项目的时候可以登录,用域名访问登录的时候就报这个错
HTTP Status 500 - --------------------------------------------------------------------------------type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception java.lang.IllegalStateException
org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:433)这时候域名不是等价于127.0.0.1 吗?
127.0.0.1 localhost
127.0.0.1 域名
当用localhost 和IP访问项目的时候可以登录,用域名访问登录的时候就报这个错
HTTP Status 500 - --------------------------------------------------------------------------------type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception java.lang.IllegalStateException
org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:433)这时候域名不是等价于127.0.0.1 吗?
org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:423)解决办法如下:在response.sendRedirect("");语句后面加上return语句就OK了。例如:response.sendRedirect(""); return ;
常见的解决方案
127.0.0.1 aaa.com我测试了一下 似乎都没问题的