在配置使用apr時,啓動Tomcat服務器後,在Catalina.log中出現如下警告:
警告: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'maxTheads' to '500' did not find a matching property.
2010-7-4 20:49:35 org.apache.catalina.startup.SetAllPropertiesRule begin
警告: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'minSpareTheads' to '100' did not find a matching property.
2010-7-4 20:49:35 org.apache.catalina.startup.SetAllPropertiesRule begin
警告: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'maxSpareTheads' to '300' did not find a matching property.
但是訪問應用程序正常。
通過網上搜索,具體解決方法如下:
server.xml中的配置HTTPS的那部分Connector代碼
<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,搞定!
根據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"。