java - Redirect after login (Spring security on GAE) -


i having troubles making login redirect same place always. have done this

<http auto-config="true" use-expressions="true" entry-point-ref="gaeentrypoint" >     <intercept-url pattern="/_ah/login" access="permitall"/>     <intercept-url pattern="/**" access="isauthenticated()"/>     <custom-filter position="pre_auth_filter" ref="gaefilter"/>     <form-login authentication-success-handler-ref="authsuccesshandler"/> </http>  <beans:bean id="authsuccesshandler"             class="dk.lindhardt.arbejdsfordeling.server.security.authenticationsuccesshandlerimpl"/> 

and

public class authenticationsuccesshandlerimpl implements authenticationsuccesshandler {     public void onauthenticationsuccess(httpservletrequest request, httpservletresponse response, authentication authentication)     throws ioexception, servletexception {        if (authentication != null && authentication.isauthenticated()) {            response.sendredirect(organizationlistservlet.url);        }    }   } 

it never gets method above. how make that?

edit: following guide http://blog.springsource.com/2010/08/02/spring-security-in-google-app-engine/

you shouldn't need have servlet there redirect. can have redirect in config itself.

<http auto-config="true">        <intercept-url pattern="/app/login" filters="none" />     <form-login          login-page="/app/login"          login-processing-url="/app/dologin"          authentication-failure-url="/app/login?login_error=1"          default-target-url="/app/home"/> </http> 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -