我的第一个问题 - 是不是可以使用https而不使用数字证书? 我的第二个问题 - 我在我的web应用程序中确保了几页。因此,添加以下内容配置Tomcat以使用SSL
<security-constraint>
<web-resource-collection>
......
</web-resource-collection>
<auth-constraint>
......
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
我试着运行该应用程序,并且启用了ssl的页面未加载。所以我继续创建证书。在server.xml中添加了以下内容?
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150"
scheme="https"
secure="true"
keystoreFile="C:\Program Files\apache-tomcat-7.0.11-windows-x86\apache-tomcat-7.0.11\.keystore"
keystorePass="johneipe"
clientAuth="optional"
sslProtocol="TLS" />
仍然我无法访问这些页面,也没有https://localhost:8443。
这不适用于公共互联网应用。这是测试。 – John
另外我创建了keytool -genkey -alias tomcat -keyalg RSA -validity 100'的密钥,并将.keystore文件复制到上面提到的目录中。 – John