Announcement Announcement Module
Collapse
No announcement yet.
after authentication, keeps going back to /login.jsp Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • after authentication, keeps going back to /login.jsp

    Hi,
    I am having problems after login, it does not go to index.jsp but instead keeps going back to /login.jsp. Guess must be something wrong in one of the configuration but just can not figure it out in the last couple of hours !

    I have /index.jsp, and /login.jsp in the web app root folder

    here is filter mapping in web.xml:
    --------------------------------------
    <filter-mapping>
    <filter-name>acegiSecurityFilter</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>

    here is security.xml (partial):
    ----------------------------------
    <bean id="filterChainProxy" class="net.sf.acegisecurity.util.FilterChainProxy" >
    <property name="filterInvocationDefinitionSource">
    <value>
    CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
    PATTERN_TYPE_APACHE_ANT
    /j_acegi_security_check*=httpSessionContextIntegrat ionFilter,authenticationProcessingFilter
    /app/*.do*=httpSessionContextIntegrationFilter,security EnforcementFilter
    /security/logout.do=httpSessionContextIntegrationFilter
    </value>
    </property>
    </bean>

    <bean id="authenticationProcessingFilter" class="net.sf.acegisecurity.ui.webapp.Authenticati onProcessingFilter">
    <property name="authenticationManager"><ref local="authenticationManager"/></property>
    <property name="authenticationFailureUrl"><value>/login.jsp?error=true</value></property>
    <property name="defaultTargetUrl"><value>/index.jsp</value></property>
    <property name="filterProcessesUrl"><value>/j_acegi_security_check</value></property>
    </bean>

    <bean id="filterInvocationInterceptor" class="net.sf.acegisecurity.intercept.web.FilterSe curityInterceptor">
    <property name="authenticationManager"><ref local="authenticationManager"/></property>
    <property name="accessDecisionManager"><ref local="accessDecisionManager"/></property>
    <property name="objectDefinitionSource">
    <value>
    CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
    PATTERN_TYPE_APACHE_ANT
    /app/*.do*=1
    /index.jsp*=1
    </value>
    </property>
    </bean>

    <bean id="accessDecisionManager" class="net.sf.acegisecurity.vote.AffirmativeBased" >
    <property name="allowIfAllAbstainDecisions"><value>true</value></property>
    <property name="decisionVoters">
    <list>
    <ref local="roleVoter"/>
    </list>
    </property>
    </bean>

    really appreciate your help!
    lixin

  • #2
    Try debug-level logging and see if it gives a clue. You're especially looking to see that SecurityEnforcementFilter stores your intended target URL in the HttpSession prior to the first redirection to the login page.

    Comment

    Working...
    X