1
添加https对tomcat的支持后。我不能运行该应用程序Tomcat安全约束不起作用
我的web.xml配置
<display-name>EBaySignin</display-name>
<welcome-file-list>
<welcome-file>credentials.jsp</welcome-file>
</welcome-file-list>
<security-constraint>
<web-resource-collection>
<web-resource-name>All Access</web-resource-name>
<url-pattern>/*</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>
(Tomcat)的server.xml中配置:
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<Connector port="8443" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
keystoreFile="/Users/ArunAbraham/.keystore" keystorePass="password"
protocol="org.apache.coyote.http11.Http11NioProtocol"
clientAuth="false" sslProtocol="TLS" />
现在我已经无法访问应用程序,我收到一个错误:无法连接到服务器。我可能会错过什么? ("https://localhost:8443/EBaySignin/")
我没有检查声明,SSL工作正常。但是,一旦我添加声明,这些应用程序都不起作用。即使是非安全的人也不会工作。它只是给了HTTP 404错误。 –
2013-02-25 01:09:28
我能够访问此https:// localhost:8443,但我无法访问该Web应用程序,我收到服务器未找到错误(404)。 – 2013-02-25 01:24:14
好的,所以SSL不是问题。所以现在到了安全限制。再次检查如何实现的基本文档,但检查“web.xml”中条件的URL模式,并且如果使用基于角色的安全性,则安全角色名称与设置的内容匹配在接收方。请记住,元素阻止未经授权的用户进入应用程序,因此他们必须被授权(用户/密码),他们的角色,检查等。 –
2013-02-25 01:42:12