0
页
Servlet的web.xml中验证我有一个web.xml看起来像:的欢迎
<web-app>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<security-constraint>
<web-resource-collection>
<web-resource-name>Default</web-resource-name>
<url-pattern>/</url-pattern>
</web-resource-collection>
<auth-constraint/>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Index page</web-resource-name>
<url-pattern>/index.jsp</url-pattern>
<url-pattern>/</url-pattern>
<http-method>GET</http-method>
<http-method>HEAD</http-method>
</web-resource-collection>
</security-constraint>
...
我们要拒绝默认情况下对资源的访问,并指定我们希望允许访问的资源。
如果用户去http://localhost:8080/他们得到的却拒绝访问,如果去http://localhost:8080/index.jsp它允许他们两个网址应显示在同一个页面,都应该被允许。我在这里做错了什么?
你不需要考虑。你是对的:) – BalusC 2009-12-16 19:00:00
我要采取这种说法,用大写字母打印出来,将它挂在桌子上并挂起来:) – 2009-12-16 19:14:15