I'm using Struts 2 and I have a private package of actions, because certain actions require login to be accessed. So I have this in my secure package:
<interceptors>
<interceptor name="authenticationInterceptor" class="com.koorde.interceptor.AuthenticationInterceptor"/>
<interceptor-stack name="secureStack">
<interceptor-ref name="authenticationInterceptor"/>
<interceptor-ref name="defaultStack"/>
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="secureStack"/>
<global-results>
<result name="login" type="redirect">dologin</result>
<result name="session_error" type="redirect"> html/error/hibernate_session.jsp</result>
<result name="error" type="redirect"> html/error/hibernate_session.jsp</result>
</global-results>
And of course other actions definition.
My problem is the following:
Let's say a user want to access his personal area. He clicks on personalArea
link and he will be automatically redirected on login page (cause personalArea
is a secure action). What I want is: after login user is automatically redirect (to continue the action) to personalArea
and not home page.
So, what I want is: when user log in into the system because of a secure actions, after login the execution of the action (secured) continues.
How can I do that?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…