2 つの問題:
問題 1:
私のapplicaitonContext-security.xml
ファイルには次のものがあります。
<security:http auto-config="true" access-denied-page="/denied.jsf" servlet-api-provision="false">
<security:intercept-url pattern="/denied.jsf" filters="none" />
<security:intercept-url pattern="/login.jsf" filters="none" />
<security:intercept-url pattern="/redirect.html" filters="none" />
<security:intercept-url pattern="/images/**" filters="none" />
<security:intercept-url pattern="/a4j_resource/**" filters="none" />
<security:intercept-url pattern="/**" access="IS_AUTHENTICATED_FULLY" />
<security:form-login login-page="/login.jsf" authentication-failure-url="/login.jsf" default-target-url="/redirect.html" />
<security:logout />
</security:http>
しかし、私が行くと、ページhttp://localhost:8080/summary/projects.jsf
にリダイレクトされません。login.jsf
何か案は。
問題 2:私が持って
いるprojects.xhtml
ページで
<rich:comboBox value="#{projectUiService.coordinatorSelected}" directInputSuggestions="true" defaultLabel="Enter Co-ordinator" >
私が持っているgetCoordinatorSelected
方法では@RolesAllowed("READ_PROJECT")
、私が得るのはエラーだけです:
AuthenticationCredentialsNotFoundException: An Authentication object was not found in the SecurityContext
ユーザーがログインしていないときにSpringをログオンページにリダイレクトするにはdenied.jsf
どうすればよいですか?また、ユーザーが正しい権限を持っていない場合にSpringをページにリダイレクトするにはどうすればよいですか?
私は過去 6 時間あたりを見回し、大量のログを試みましたが、解決策が見つかりません。任意のポインタをいただければ幸いです。
ありがとう