2
我正在使用JBoss 4.2。我希望通過HTTPS訪問特定的網址格式。 我使用了自我認證的密鑰庫文件,問題是:一旦HTTPS網址被訪問, 網站上的所有其他網址都會通過HTTPS,那麼問題是什麼?Jboss中的HTTPS配置
已更新:我發現了這個問題。我使用相對路徑來引用資源,所以一旦URL更改爲HTTPS,所有後續鏈接都將以HTTPS啓動,那麼我必須在HTTPS網頁中使用絕對路徑嗎?
我的配置是這樣的: 在web.xml:
<security-constraint>
<web-resource-collection>
<web-resource-name>artists.jsp</web-resource-name>
<url-pattern>/artists.*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
server.xml中:
<Connector port="8443"
scheme="https"
secure="true"
clientAuth="false"
keystoreFile="${jboss.server.home.dir}/conf/server.keystore"
keystorePass="changeit"
sslProtocol = "TLS" />