我們正在努力實現HTTPS在我們application.So一些網頁上,我們改變了tomcat的server.xml中進行HTTPS調用如下:如何在應用程序中實現所需頁面的HTTPS?
<Connector
port="8080"
protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
acceptCount="100"
maxKeepAliveRequests="15"
SSLEnabled="true"
scheme="https"
secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="/webapps/test.bin"
keystorePass="test"/>
在應用的web.xml:
<security-constraint>
<web-resource-collection>
<web-resource-name>securedapp</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
所以,HTTPS正在申請所有頁面。如何限制所需頁面的HTTPS。
幫助將不勝感激。
做你的 「一些網頁」 具有一些共同的URL模式? – JoseK
N - [joseK no.Url模式不同 – Unknown
這個主題是與http://stackoverflow.com/questions/1454021/how-to-implement-a-https-login-page-in-a-web-application頗爲相似。 –