tags:

views:

577

answers:

2

Hi All,

I am working on struts2. I have an interceptor that executes before my action claas. Now when I submit on a jsp page control goes to interceptor and after some processing there the control goes to action class. This complete flow is running well. But I found two things –

1) Control does not go to action-validation.xml before going to action class.

2) Its not getting the values of textfield or etc that uses has entered into jsp page before submitting.

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

Thanks in advance.

A: 

I'd be looking at the order in which you have your interceptors defined in struts.xml. You need to make sure that you have a params interceptor (at least 1, the model driven pattern requires 2) and a validation interceptor defined in the correct place. I generally copy the default stack (defined here) and then modify it for my needs. Perhaps you could add your interceptor stack definition to your question?

Peter Kelley
A: 

Thank you. This was very helpful