Dispatcher: The default is that dispatcher is forwarding, carrying the processed data to the specified JSP resource.
Redirect: Redirect loses all request parameters, request properties, and action-processed results.
Redirection: Similar to redirect, it is also a new request to regenerate. Used when a direct request to redirect to another action needs to be made after an action processing is completed.
Note: The difference between redirect and redirection
STRUTS2 Project encountered a problem, the business is this: Modify a post information, after the end using the type of the result of redirection to redirect to another action, display the updated list.
The update uses the name of input as the post. property, which has a private property in Postaction to accept. After modifying the method of redirecting to the display list in the postaction, and then uploading the data to the foreground, the iterator tag of the day before yesterday iterates over all post,var= "post", and all post properties in the list become the newer one. The reason is that the properties of the post are accepted for the update, but the redirect does not carry the original data.
I feel it should be because after redirection, because the action has a member variable, is a number of cases, so in a session also holds the Post property values, it can be taken out.
The method is the name property of input and the Var value in the list as much as possible to avoid duplication, so that the El expression values are separated.
The SPRINGMVC controller in spring container management is singleton by default because there is no member variable in the controller, and multiple threads are accessed without causing thread insecurity.
and struts2 defaults to multiple cases.
Multiple cases and singleton SPRINGMVC in redirect requests in Struts2 Struts2