今天做项目时遇到了取消数据登录,页面重定位时页面无法显示的问题。
数据登录→取消数据登录时利用response.sendRedirect进行重定位。
使用SSL Accelerator时,
客户端访问URL:https://host.domain/context/●●.jsp
tomcat接受的URL:http://host.domain/context/●●.jsp
https 变成了 http。
因此,当访问http访问受限的环境时,页面无法正常转移而出错。
解决方法
更改tomcat的server.xml的connector标签。
proxyName="<server name>" ※domain name
proxyPort="<port>" ※一般情况下SSL为443
scheme="<scheme>" ※一般情况下SSL为https