[ 
https://issues.apache.org/struts/browse/WW-1963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42262
 ] 

Al Sutton commented on WW-1963:
-------------------------------

Think about it like this;

X.jsp is a generic page which can show s:errormesssages and has a link to
ActionB

ActionB populates a java.util.List based on the results of a database query
and has a success result which sends the user to Y.jsp (below), and an error
result which sends the user to X.jsp.

Y.jsp which shows the list in an s:select and asks for other data. The data
is submitted to ActionA

ActionA which validates the data from Y.jsp

If validation fails in ActionA I would like to display Y.jsp with the
s:select populated. The only way to populate the options for the s:select is
via ActionB. Heres the problem; If an actionError has been added in ActionA
and the error result sends the user back to ActionB in order to populate the
list, the user ends up at X.jsp which is the error result of ActionB, not
back at Y.jsp with the list populated.

So In a nutshell; As I see it any validation errors in ActionA should send
the user to ActionA's error result, but once they're at that error result
processing should continue as normal (i.e. allowing ActionB to run and
return its success result). Without this you end up with actions not being
able to handle error results for other actions.



> Incorrect result used if using message store interceptor, validation, and 
> action errors.
> ----------------------------------------------------------------------------------------
>
>                 Key: WW-1963
>                 URL: https://issues.apache.org/struts/browse/WW-1963
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Interceptors
>    Affects Versions: 2.0.6, 2.0.7, 2.0.8, 2.0.9
>         Environment: Produced on Windows Vista, Java 1.5.0_11, and Tomcat 
> 5.5.23
>            Reporter: Al Sutton
>             Fix For: 2.0.12
>
>
> Reproduction Example
> -------------------------------
> To reproduce this ActionA and ActionB extend ActionSupport and the message 
> store interceptor and the validation interceptor are enabled. ActionA uses 
> the STORE mode on the message store interceptor, and ActionB uses the 
> RETREIVE mode.
> Actual Behaviour 
> -----------------------
> If ActionA calls addActionError and then returns a redirect to ActionB the 
> validation interceptor looks for an input result on ActionB and either 
> redirects the users to ActionBs input result, or fails with an exception if 
> an input result is not available.
> Expected Behaviour
> ---------------------------
> The redirect result from ActionA should be made and executed as normal. The 
> validation interceptor should look for or use the input result of the action 
> after the redirection has been made.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to