1
我已经按照以下步骤在NetBeans中的tomcat中配置了HTTPS,但是当我尝试通过HTTPS访问该站点时,出现错误“安全连接失败”。请帮助无法使用Netbeans在Tomcat中配置HTTPS
1)生成密钥
keytool -genkey -alias Crunchify -keyalg RSA -keystore
2)复制键<tomcat installation dir>
/conf目录
3)修改server.xml文件
<Connector SSLEnabled="true" acceptCount="100" clientAuth="false" disableUploadTimeout="true" enableLookups="false" keystoreFile="conf/.keystore" keystorePass="password" maxThreads="25" port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="https" secure="true" sslProtocol="TLS"/>
4)打开项目web.xml并在<web-app>
下加了下面的标签
<security-constraint>
<display-name>Constraint2</display-name>
<web-resource-collection>
<web-resource-name>secure</web-resource-name>
<description/>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<description/>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>