Login redirect after authentication in struts 2 using interceptors

后端 未结 1 1928
时光取名叫无心
时光取名叫无心 2021-01-28 07:53

I have a login page. Requests for login can come from multiple action classes. Once the user is validated i have to redirect it to the previous action class (from which the requ

相关标签:
1条回答
  • 2021-01-28 08:11

    You are missing a global result that will use a dynamic parameter for your target action's URL.

    <global-results>
        <result name="return" type="redirect">${target}</result>
    </global-results> 
    

    You can return this result from the interceptor or from the action that implements TargertAware. The target property should have a getter to be invoked by the result.

    0 讨论(0)
提交回复
热议问题