tomcat8 http转https

tomcat8.5

conf/web.xml中修改 最后边增加

<!-- http协议自动转 https -->
        <security-constraint> 
         <web-resource-collection > 
              <web-resource-name >SSL</web-resource-name>  
              <url-pattern>/*</url-pattern> 
       </web-resource-collection> 
       <user-data-constraint> 
                    <transport-guarantee>CONFIDENTIAL</transport-guarantee> 
       </user-data-constraint> 
    </security-constraint>

tomcat8 http转https

转载于:https://my.oschina.net/suncf/blog/3050643