BEAN: parameter query HTTP Request Parameters
Used to retrieve the parameter values in the request. If the multiple attribute is not specified, a string type bean is created based on the retrieved value. If the multiple attribute is specified, an array of the string [] type is created based on the retrieved value. Then, bind string or string [] to the page scope with the ID attribute value (this binding is used for other tags to use this value ), and create the corresponding scripting variable (this variable is used for JSP scripts to use this value ).
The following two code snippets use the same URL to pass parameters. The URL format is http: // 127.0.0.1: 8080/Struts-demo/parameter. jsp? Param = 1 & Param = 2 & Param = 3. The multiple attribute is not specified in the preceding code snippet. Therefore, P is of the string type and only reads the first value of the parameter. The value of the multiple attribute is specified in the subsequent code snippets. Therefore, PS is the value of string [] type that contains all parameters.
<Bean: parameter id = "p" name = "Param"/>
<Bean: write name = "p"/>
<Bean: parameter id = "Ps" multiple = "true" name = "Param"/>
<Logic: iterate id = "p" name = "Ps">
<Bean: write name = "p"/> <br/>
</Logic: iterate>