Hi guys,

I wrote simple web application using spring+shiro+tomcat.

When I tried to access protected resourses, it redirected me to login page, 
then after login successfully, it didn't redirect to original url.


Configuration is as below,

<bean id="shiroFilter" 
class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
        <property name="securityManager" ref="securityManager"/>
        <property name="loginUrl" value="/login.jsp"/>
        <property name="successUrl" value="/index.jsp"/>
        <property name="unauthorizedUrl" value="/dashboard/unauthorized.jsp"/>
        <property name="filterChainDefinitions">
            <value>
                /school/list/** = authc
                /user/** = authc, roles[888888]
                /role/** = authc, roles[888888]
                /permission/** = authc, roles[888888]
            </value>
        </property>
    </bean>


Code in login controller is as below,

currentUser.login(token);

WebUtils.redirectToSavedRequest(request, response, null);


Exception indicated that the savedRequest was null.

How could I fix this problem?


Thanks,

Jared, (韦煜)
Software developer
Interested in open source software, big data, Linux

Reply via email to