配置HTTPS时启动tomcat出现did not find a matching property错解决方法

Tomcat 6,JDK 1.6。

在配置HTTPS时,启动Tomcat服务器后,在Catalina.log中出现

警告: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'keystoreFile' to 'F:\mypath\test.keystore' did not find a matching property.


<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS"
               keystoreFile="你的.keystore文件" />

将protocol参数由"HTTP/1.1"改成"org.apache.coyote.http11.Http11Protocol",重新启动Tomcat,搞定!

ps:改正后的代码为:

<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
     keystoreFile="F:\mypath\test.keystore"
keystorePass="changeit"
               clientAuth="false" sslProtocol="TLS" />

根据Tomcat官方的文档http://tomcat.apache.org/tomcat-6.0-doc/config/http.html,"HTTP/1.1"和"org.apache.coyote.http11.Http11Protocol"是一样的,但是不知道为什么前者会出错而后者就是对的,而且HTTP部分的Connector用的也是"HTTP/1.1"。

转载请注明



你可能感兴趣的:(apache,jdk,html,tomcat,F#)