Question

I am using Struts2 with jsp pages and xwork validation. My problem is in java side validation, when I first land in input-page due to input errors and after that I leave those errors there and submit again. The very same errors should be shown but they aren't. Java file contains field errors and those are not shown anymore after second try.

What is the problem? Missing interceptor or bug in struts2? I have the following interceptors: - com.opensymphony.xwork2.interceptor.I18nInterceptor - com.opensymphony.xwork2.validator.ValidationInterceptor - com.opensymphony.xwork2.interceptor.PrametersInterceptor

I read from another thread that input landing page does omit the validation somehow. How can I enable the validation also when making calls from that page?

Was it helpful?

Solution

You also need the DefaultWorkflowInterceptor, which is responsible for detecting validation errors and re-showing the form.

For any additional troubleshooting, you will need to provide your action code so that we can see what's up.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top