In the authenticationProcessingFilter, you can set the
defaultTargetUrl.  You can also set it's always used:

   <bean id="authenticationProcessingFilter"
class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter">
       <property name="authenticationManager" ref="authenticationManager"/>
       <property name="authenticationFailureUrl"
value="/login.jsp?error=true"/>
       <property name="defaultTargetUrl" value="/yourdesiredurl"/>
       <property name="alwaysUseDefaultTargetUrl" value="true"/>
       <property name="filterProcessesUrl" value="/j_security_check"/>
       <property name="rememberMeServices" ref="rememberMeServices"/>
   </bean>

HTH,

Matt

On 1/29/07, Jonathan Tse <[EMAIL PROTECTED]> wrote:
Hi all,

    Does anyone know that how do i specify an explicit redirect url
after acegi have authenticated the user? I understand that if I try to
access a protected resource, acegi will automatically store the url in
the session and redirect to this resource once the user is
authenticated. But in my case i want to specify the url to be redirected
when I present a login page to user (the user is not accessing protected
resource, i just want the user to log on there).

    I tried to put
|AbstractProcessingFilter.ACEGI_SECURITY_TARGET_URL_KEY in ||HttpSession
(in the formBackingObject method of this controller) but this constant
cannot be found.

    Any idea?

Best regards,
Jonathan Tse
|


 From acegi documentation:
Once the |SecurityContextHolder| has been updated, the browser will need
to be redirected to the target URL. The target URL is usually indicated
by the |HttpSession| attribute specified by
|AbstractProcessingFilter.ACEGI_SECURITY_TARGET_URL_KEY|. This attribute
is automatically set by the |ExceptionTranslationFilter| when an
|AuthenticationException| occurs, so that after login is completed the
user can return to what they were trying to access. If for some reason
the |HttpSession| does not indicate the target URL, the browser will be
redirected to the |defaultTargetUrl| property.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to