this guide(残念ながらドイツ語)に続いて、私のspring + hibernate + spring-securityとtiles2 - "HelloWorld"アプリケーションを動作させようとしています。j_spring_security_check 404 issue
私の問題は、アプリケーションにログインするときに「404」というエラーメッセージが表示されることです。ログインページへのリダイレクトは意図どおりに機能しますが、ログインボタンを押すと "http://localhost:8080/App/j_spring_security_check"に届きません。
<http use-expressions="true">
<intercept-url pattern="/index.html" access="permitAll" />
<intercept-url pattern="/timeout.html" access="permitAll" />
<intercept-url pattern="/redirect.html" access="permitAll" />
<intercept-url pattern="/media/**" access="permitAll" />
<intercept-url pattern="/includes/**" access="permitAll" />
<intercept-url pattern="/office/**" access="hasRole('ROLE_USER')" />
<intercept-url pattern="/office/admin/**" access="hasRole('ROLE_ADMIN')" />
<form-login login-page="/index.html"
authentication-failure-url="/index.html?login_error=1"
default-target-url='/office/kunden.html'
always-use-default-target='true'
/>
<logout logout-success-url="/index.html" />
<remember-me />
<session-management invalid-session-url="/index.html">
<concurrency-control max-sessions="2" error-if-maximum-exceeded="true" />
</session-management>
</http>
<authentication-manager>
<authentication-provider>
<jdbc-user-service data-source-ref="mysqldataSource"
authorities-by-username-query="select username, authority from benutzer where username = ?"
users-by-username-query="select username, password, enabled from benutzer where username = ?"/>
</authentication-provider>
</authentication-manager>
データベース接続がO.K.のようです...
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/defs/applicationContext.xml
/WEB-INF/defs/applicationContext-security.xml
</param-value>
</context-param>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
</listener>
とApplicationContextの-のsecurity.xmlファイルはこのようになります:
私のweb.xmlはこのように見えます
私はすでに多くのグーグルをしていたので、誰かが私にヒントを与えることができたら非常にうれしいですが、解決策はまだ見つかりませんでした。
私はspring 3.1とtomcat 7.0.23を使用します。
"j_security_check"または "j_spring_security_check"を意味しますか?あなたはここにいます... –
申し訳ありません、それはj_spring_security_checkです – xSNRG
そのリクエストのデバッグログ出力を確認し、Spring Securityが処理していることを確認してください。フィルターチェーンを通過したことの詳細レポートが表示されます。 –