| |||||||
FRAMES NO FRAMES |
Render an HTTP Redirect
Performs an HttpServletResponse.sendRedirect()
call to the hyperlink specified by the attributes to this tag. URL rewriting will be applied automatically, to maintain session state in the absence of cookies.
The base URL for this redirect is calculated based on which of the following attributes you specify (you must specify exactly one of them):
ActionForward
to be looked up, and use the module-relative or context-relative URI found there.Normally, the redirect you specify with one of the attributes described in the previous paragraph will be left unchanged (other than URL rewriting if necessary). However, there are two ways you can append one or more dynamically defined query parameters to the hyperlink -- specify a single parameter with the paramId
attribute (and its associated attributes to select the value), or specify the name
(and optional property
) attributes to select a java.util.Map
bean that contains one or more parameter ids and corresponding values.
To specify a single parameter, use the paramId
attribute to define the name of the request parameter to be submitted. To specify the corresponding value, use one of the following approaches:
paramName
attribute - The named JSP bean (optionally scoped by the value of the paramScope
attribute) must identify a value that can be converted to a String.paramName
and paramProperty
attributes - The specified property getter method will be called on the JSP bean identified by the paramName
(and optional paramScope
) attributes, in order to select a value that can be converted to a String.If you prefer to specify a java.util.Map
that contains all of the request parameters to be added to the hyperlink, use one of the following techniques:
name
attribute - The named JSP bean (optionally scoped by the value of the scope
attribute) must identify a java.util.Map
containing the parameters.name
and property
attributes - The specified property getter method will be called on the bean identified by the name
(and optional scope
) attributes, in order to return the java.util.Map
containing the parameters.As the Map
is processed, the keys are assumed to be the names of query parameters to be appended to the hyperlink. The value associated with each key must be either a String or a String array representing the parameter value(s). If a String array is specified, more than one value for the same query parameter name will be created.
Tag Information | |
Tag Class | org.apache.strutsel.taglib.logic.ELRedirectTag |
TagExtraInfo Class | None |
Body Content | JSP |
Display Name | None |
Attributes | ||||
Name | Required | Request-time | Type | Description |
action | false | true | java.lang.String | Logical name of a global |
anchor | false | true | java.lang.String | Optional anchor tag ("#xxx") to be added to the generated hyperlink. Specify this value without any "#" character. |
forward | false | true | java.lang.String | Logical name of a global |
href | false | true | java.lang.String | The URL to which this redirect will transfer control. This URL may be dynamically modified by the inclusion of query parameters, as described in the tag description. You must specify exactly one of the |
name | false | true | java.lang.String | The name of a JSP bean that contains a |
page | false | true | java.lang.String | The context-relative path (beginning with a "/" character) to which this hyperlink will transfer control if activated. This hyperlink may be dynamically modified by the inclusion of query parameters, as described in the tag description. You must specify exactly one of the |
paramId | false | true | java.lang.String | The name of the request parameter that will be dynamically added to the generated hyperlink. The corresponding value is defined by the |
paramName | false | true | java.lang.String | The name of a JSP bean that is a String containing the value for the request parameter named by |
paramProperty | false | true | java.lang.String | The name of a property of the bean specified by the |
paramScope | false | true | java.lang.String | The scope within which to search for the bean specified by the |
property | false | true | java.lang.String | The name of a property of the bean specified by the |
scope | false | true | java.lang.String | The scope within which to search for the bean specified by the |
transaction | false | true | java.lang.String | Set to |
useLocalEncoding | false | true | java.lang.String | If set to |
Variables | No Variables Defined. |
| |||||||
FRAMES NO FRAMES |