Problem in interceptor execution before action in struts2

I am working on struts2. I have an interceptor that executes claas before my actions. Now when I post to the jsp control it goes to the interceptor and after some processing it goes to the action class. This full stream works well. But I found two things -

1) Before going to action class, the control does not go to action-validation.xml.

2) Without delivering the value of the textbox or etc it used, it injected into the jsp page before submitting.

Can anyone tell me how to find a solution for these two points.

Thanks in advance.

0


a source to share


1 answer


I would look at the order in which you have your interceptors defined in struts.xml. You need to make sure you have a params interceptor (at least 1, a template driven model requires 2) and a validated interceptor defined in the correct place. I usually copy the default stack (defined here ) and then modify it for my needs. Perhaps you could add your interceptor definition to your question?



0


a source







All Articles