Resolution: Not A Problem
Affects Version/s: None
Fix Version/s: None
Component/s: XML Configuration
Problem statement :
I have a problem with forwarding the request to an action.
I am using validations for the fields mention on the form , once validation fails as struts defined it will check for result name "Input".
If the result name "Input" is defined with result type "redirect-action" as shown below , this will forward to the mention action with new request.
<result name="input" type="redirect-action">
Is there any way where I can forward to an action , but still can use the old request object, throught will I can display the invalid values that user enter.
I tried all the result type like :
dispatcher — Dispacther uses the old request object but the location must be a view not an action.
Chain — chain uses the old request object but it is excuted irrespective of what happen , life even if the validation pass chain is going to exucute.
redirect – same as redirect-action.
Do anybody got such a problem earlier. ?
Temp solution :
I am setting the values in the session in the getter method of the object. and setting back to the new request removing it from the session.
But i think this is a temp solution , there should be a direct solution where we can speicfy in resut-type like redirect with the old request object.
Please any Inputs are highly appreicated.