Scenario One : The JSP is submitted to an action, and if the action method is finished, it goes to another method in that action.
Then you can return the other method directly, and then configure the method in Struts.xml.
Scenario Two :
The JSP page submits an action, and if the Giantaction method executes, it goes to a method in another action
Redirect is required at this time
Only the return "name value" is required
The redirection name value is then configured in Struts.xml, and type types use redirect.
If you need to pass parameters, you can use the Param tag as follows, and then define the parameters in the download action, and get and set to
situation three :
On a page that is displayed on an action page, if you want to go to a method in another action by using the button.
Such as:
By clicking the button to go to another JSP page, you can go directly to another action when committing:
In the Struts.xml, write the action directly to
, if you need to pass parameters, you can put the parameters in the URL through the Param object to the key value in the input hidden field of value. The Get and set methods for the properties of the parameter are then written in the action above and can be passed to the action.
Scenario Four :
If it is necessary to pass the parameters through Struts.xml, that is the following:
You need to take the value of Paperid before passing it, you can add the hidden field on the JSP page and fetch the Paperid.
As follows: So there is a Paperid value in the action above.
The XML is then passed to pass the parameters as follows:
You only need to define the corresponding Paperid property in the passed action, and you can get the value from both the Got and set.
Four questions about the transfer value of the JSP page and the action to the Action and action