This label is used to create a URL. You can useThis sub-tag adds Request Parameters for the URL. If the parameter is an array or set, all values will be used as parameters.
Several important attributes:
Action (String): The name of an action, which has the same role as the value attribute. If both exist, value has a priority.
Value (String): This attribute must be consistent with the action name in struts. xml.
Method (String): The specific method name in action. The default value is execute.
IncludeParams (String): This attribute has three values: none (default), get, and all. none indicates that the url does not contain any parameters, but you can add parameters to the url using the param subtag; get indicates that the url contains parameters submitted in GET mode. For example, the jsp page of the url tag is http :// : / /EditUser. action? Id = 168 & name = derek, but it can be overwritten by the param sub-tag. As in example3 below, the url will change to http :// : / /EditUser. action? Id = 1 & name = derek; post indicates the parameters in the url that contain the GET and POST request methods.
The following are three small examples provided on the official struts2 website.
<-- Example 1 -->
<-- Example 2 -->
<-- Example 3-->
Then Labels are very nice, such
Derek lab The url can be implemented, with the jump of parameters ~