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