Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Can you check your web.xml is supporting forward request?</p> <p>errorPage is a FORWARD request and mostly in web.xml we support REDIRECTS only. Just a thought else your code looks ok to me. </p> <p>Edited </p> <p>A different point of view and This is been taken from working code only. Have a look at <a href="http://static.springsource.org/spring-security/site/docs/3.0.x/apidocs/org/springframework/security/access/vote/AuthenticatedVoter.html" rel="nofollow">Authenticated Voter class</a></p> <p>Disable the annotations </p> <pre><code>&lt;global-method-security pre-post-annotations="disabled" secured-annotations="disabled" access-decision-manager-ref="accessDecisionManager"&gt; &lt;/global-method-security&gt; </code></pre> <p>bypassing filters </p> <pre><code>&lt;http auto-config="true" use-expressions="true" access-decision-manager-ref="accessDecisionManager" access-denied-page="/accessDenied"&gt; &lt;intercept-url pattern="/appsecurity/login.jsp" filters="none" /&gt; &lt;intercept-url pattern="/changePassword" filters="none" /&gt; &lt;intercept-url pattern="/pageNotFound" filters="none" /&gt; &lt;intercept-url pattern="/accessDenied" filters="none" /&gt; &lt;intercept-url pattern="/forgotPassword" filters="none" /&gt; &lt;intercept-url pattern="/**" filters="none" /&gt; &lt;form-login login-processing-url="/j_spring_security_check" default-target-url="/home" login-page="/loginDetails" authentication-failure-handler-ref="authenticationExceptionHandler" authentication-failure-url="/?login_error=t" /&gt; &lt;logout logout-url="/j_spring_security_logout" invalidate-session="true" logout-success-url="/" /&gt; &lt;remember-me /&gt; &lt;!-- Uncomment to limit the number of sessions a user can have --&gt; &lt;session-management invalid-session-url="/"&gt; &lt;concurrency-control max-sessions="1" error-if-maximum-exceeded="true" /&gt; &lt;/session-management&gt; &lt;/http&gt; </code></pre> <p>custom Decision Voter </p> <pre><code>&lt;bean id="customVoter" class="xyz.appsecurity.helper.CustomDecisionVoter" /&gt; </code></pre> <p>Access Decision Manager </p> <pre><code>&lt;!-- Define AccessDesisionManager as UnanimousBased --&gt; &lt;bean id="accessDecisionManager" class="org.springframework.security.access.vote.UnanimousBased"&gt; &lt;property name="decisionVoters"&gt; &lt;list&gt; &lt;ref bean="customVoter" /&gt; &lt;!-- &lt;bean class="org.springframework.security.access.vote.RoleVoter" /&gt; --&gt; &lt;bean class="org.springframework.security.access.vote.AuthenticatedVoter" /&gt; &lt;/list&gt; &lt;/property&gt; &lt;/bean&gt; </code></pre> <p>Authentiation Exception Handler </p> <pre><code>&lt;bean id="authenticationExceptionHandler" class="org.springframework.security.web.authentication.ExceptionMappingAuthenticationFailureHandler"&gt; &lt;property name="exceptionMappings"&gt; &lt;props&gt; &lt;!-- /error.jsp --&gt; &lt;prop key="org.springframework.security.authentication.BadCredentialsException"&gt;/?login_error=t&lt;/prop&gt; &lt;!-- /getnewpassword.jsp --&gt; &lt;prop key="org.springframework.security.authentication.CredentialsExpiredException"&gt;/changePassword&lt;/prop&gt; &lt;!-- /lockedoutpage.jsp --&gt; &lt;prop key="org.springframework.security.authentication.LockedException"&gt;/?login_error=t&lt;/prop&gt; &lt;!-- /unauthorizeduser.jsp --&gt; &lt;prop key="org.springframework.security.authentication.DisabledException"&gt;/?login_error=t&lt;/prop&gt; &lt;/props&gt; &lt;/property&gt; &lt;/bean&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload