2011-03-27 83 views
4

我正在嘗試在Spring3中使用安全性編寫一些內容。我試圖使用默認的登錄屏幕,每個人都說Spring會爲你顯示。但經過努力和取得誤區之二日:j_spring_security_check不可用。請幫助Spring3登錄

/spring-security-login not found

我放棄和改變了我的代碼:

<http auto-config="true"> 
<intercept-url pattern="/friends/**" access="ROLE_USER,ROLE_ADMIN" /> 
<form-login login-page="/login.jsp" 
     default-target-url="/friends/add.html" 
     authentication-failure-url="/login.jsp?authfailed=true" /> 
</http> 

和我加入了login.jsp到我的項目,我認爲我做了正確的。現在,我收到此錯誤:

HTTP Status 404 - /MySpring/j_spring_security_check message /MySpring/j_spring_security_check description The requested resource (/MySpring/j_spring_security_check) is not available.

回答

0

在web.xml中添加此