Interceptor can't access Action Parameters

后端 未结 1 560
轮回少年
轮回少年 2020-12-18 14:39

I\'m creating an example for struts2 interceptors. I created a simple login page and used a custom interceptor class to encrypt the input. But the interceptor is reading the

1条回答
  •  无人及你
    2020-12-18 15:23

    If you want to access parameters, the params interceptor should go first

    
       
       
       
       /success.jsp
       /index.jsp
    
    

    Your problem is that those parameters don't go to the valueStack, and you should probably get them from the action context.

    Map params = ActionContext.getContext().getParameters();
    

    But after params interceptor they should be there.

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