If I am at http://foo.bar?fooId=123 and the validation fails (validate method in action class) I get redirected to http://foo.bar without the fooId param. This causes form fields to lose their values. Any ideas why this is happening?
If I am at http://foo.bar?fooId=123 and the validation fails (validate method in action class)
Share
You are using
GETto send your parameters, server on validation failure is sending you the same input page, instead ofGETusePOSTand everything should work fine.Your configuration would look like this :
<result name="input">inputPage.jsp</result>which discards any parameter that you submitted.Also note as per HTML specification
GETshouldn’t be called if operation will result in any updatation, insteadPOSTshould be used.