You couls try using a relative URL instead and name both pages
"login.jsp". If that doesn't work, you might try searching Acegi's
forums.
http://forum.springframework.org/forumdisplay.php?f=33
Matt
On 6/1/07, W. Ivan Coro <[EMAIL PROTECTED]> wrote:
Hello all,
I developed a website with version 1.9.4. It has a public site and an admin
panel. There are users that can login to the public site and there are admin
users who can login to the admin panel.
I use different login forms for each one. The problem is that when a user
tries to login to the admin panel, and if he enters the wrong password, the
app redirects to the public login form, not the admin. Both login forms post
to /j_security_check and then the filter is redirecting it to
/login.jsp?error=true instead of /adm/login.jsp?error=true. How can I make
it redirect to the correct one?
Here's part of the security.xml I have:
<bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy">
<property name="filterInvocationDefinitionSource">
<value>
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
PATTERN_TYPE_APACHE_ANT
/adm/**=httpSessionContextIntegrationFilter,logoutFilter,adminAuthenticationProcessingFilter,securityContextHolderAwareRequestFilter,rememberMeProcessingFilter,anonymousProcessingFilter,adminExceptionTranslationFilter,filterInvocationInterceptor
/**=httpSessionContextIntegrationFilter,logoutFilterPublic,authenticationProcessingFilter,securityContextHolderAwareRequestFilter,rememberMeProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor
</value>
<!-- Put channelProcessingFilter before
securityContextHolderAwareRequestFilter to turn on SSL switching -->
<!-- It's off by default b/c Canoo WebTest doesn't support SSL
out-of-the-box -->
</property>
</bean>
<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="/main.html"/>
<property name="filterProcessesUrl" value="/j_security_check"/>
<property name="rememberMeServices" ref="rememberMeServices"/>
</bean>
<bean id="adminAuthenticationProcessingFilter"
class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter">
<property name="authenticationManager" ref="authenticationManager"/>
<property name="authenticationFailureUrl"
value="/adm/loginAdm.jsp?error=true"/>
<property name="defaultTargetUrl" value="/adm/mainMenu.html"/>
<property name="filterProcessesUrl" value="/j_security_check"/>
<property name="rememberMeServices" ref="rememberMeServices"/>
</bean>
_________________________________________________________________
Don't miss your chance to WIN $10,000 and other great prizes from Microsoft
Office Live http://clk.atdmt.com/MRT/go/aub0540003042mrt/direct/01/
---------------------------------------------------------------------
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]