Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Tomcat tomacat8和Struts2上的SSL_Tomcat_Ssl_Struts2 - Fatal编程技术网

Tomcat tomacat8和Struts2上的SSL

Tomcat tomacat8和Struts2上的SSL,tomcat,ssl,struts2,Tomcat,Ssl,Struts2,我有一台正在运行的服务器Tomcat 8,带有以下连接器: <Connector connectionTimeout="20000" port="80" protocol="HTTP/1.1" redirectPort='443"/> <Connector SSLEnabled="true" URIEncoding="UTF-8" clientAuth="false" connectionTimeout="20000" keystoreFile="

我有一台正在运行的服务器Tomcat 8,带有以下连接器:

<Connector connectionTimeout="20000" port="80" protocol="HTTP/1.1" redirectPort='443"/>


<Connector SSLEnabled="true" URIEncoding="UTF-8" clientAuth="false" 
            connectionTimeout="20000" keystoreFile="path" 
            keystorePass="pwd" maxThreads="150" port="443" protocol="HTTP/1.1" scheme="https" secure="true" sslProtocol="TLS"/>

不断搜索,我找到了解决方案

http-->https重定向只需要tomcat配置;不需要应用程序设置

除了server.xml中的连接器之外,请在web.xml中添加其他连接器

<security-constraint>
        <web-resource-collection>
            <web-resource-name>Entire Application</web-resource-name>
            <url-pattern>/*</url-pattern>
        </web-resource-collection>
        <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

整个应用程序
/*
保密的
资料来源: