[
https://issues.apache.org/struts/browse/WW-1963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43573#action_43573
]
Al Sutton commented on WW-1963:
-------------------------------
To illustrate another side effect of this problem, consider try following;
1) You have a View Action which displays all of the data of a specific type,
which uses the StoreInterceptor in retreive in order to show confirmation
messages from an Update action.
2) You have an Edit Action which sends the user to edit.jsp via the dispatcher
result type. edit.jsp has a menu taking the user to other places in the app.
3) You have an Update Action which is called by submitting a form on edit.jsp,
this can return the user to edit.jsp using the dispatcher if there is a problem
with the form data, or it can take the user to the View Action via a redirect
if everything is OK. The Update Action uses the StoreInterceptor in STORE mode
in order to send a confirmation back to the View Action.
Now, if the user gets to the edit stage submits the form, but has made a
mistake which sends them back to edit.jsp, clicks on the menu to go to another
action they end up seeing the error message twice, once when the get redirected
back to edit.jsp from the UpdateAction, and a second time when they click on
any of the links from the menu on edit.jsp.
This can't be intentional behaviour because to a user this is just confusing.
> 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: Core 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.1.2
>
>
> 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.