I am populated a page using some database values, if user enters some values upon that and submits the form i am redirecting to .do(which populates with DB values) but i am loosing user entered values, if i redirect to the jsp i am getting null pointer exception on populated field values.
create a 3rd action mapping that is mapped to the same form-bean definition and used this new mapping (uri) as your 'input' attribute for the action where you set validation to true. in essense, you'll have 3 mappings (a bit ugly, yes):
1. /myaction/entry.do (name="MyForm") //where DB values are loaded initially
2. /myaction/submit.do (name="MyForm" validate="true" input="/myaction/failed.do") //where action is submited to
3. /myaction/failed.do (name="MyForm") //temporary uri to hold form values, needs to map this to a different action class that forwards to the same jsp/tile as #1 mapping.
this is a little easier if you have all 3 inside a DispatchAction. the only thing you'll have to do is create a 'failed' method in the DispatchAction and specify the param attribute's value to 'failed' for the input (input="/myaction/submit.do?action=failed"). [ May 16, 2005: Message edited by: alan do ]
-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>