我已经创建了一个Java servlet Web应用程序。它可以与“ http”一起正常工作。现在,我要设置到服务器的“ https”安全连接。为此,我已在tomcatserver / conf / server.xml中正确配置了以下内容。
Connector port="8443" protocol="HTTP/1.1"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
keystoreFile="conf\localhost.jks" keystorePass="xxxx"
clientAuth="false" sslProtocol="TLS" />
然后,我还在web.xml文件中配置了以下内容。
<security-constraint>
<web-resource-collection>
<web-resource-name>HTTPSOnly</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
我该如何解决?