Struts logic tags
You can create Struts logic tags from the Struts Logic Tags drawer. These tags are useful in managing conditional generation of output text, looping over object collections for repetitive generation of output text, and application flow management.
When you are editing a Struts JSP page in Page Designer, you can open the Struts Logic Tags drawer on the palette and add to the page any of the elements that are listed in the table below.
The tags are listed in alphabetical order. Some tags may be hidden on the palette. To show a hidden tag in the palette, right-click the tags drawer and select
Customize. Clear the
Hide check box for each component that you want to display on the palette.
Each tag has a number of attributes you can set by using the Properties view of the tag. For an alphabetical listing and description of all the attributes, refer to the related reference. To look up attributes for which you want additional detail, use the Attribute listings while working with the Properties view of the tag.
Each tag has a
logic prefix. For example,
empty is logic:empty.
Element Description Empty Evaluates the nested body content of this tag if the requested variable is either null or an empty string. Equal Evaluates the nested body content of this tag if the requested variable is equal to the specified value. Forward Forwards control to the page specified by the specified ActionForward entry. Greater Equal Evaluates the nested body content of this tag if the value of the requested variable is greater than or equal to the specified value. Greater Than Evaluates the nested body content of this tag if the value of the requested variable is greater than the specified value. Iterate Repeat the nested body content of this tag over a specified collection. Less Equal Evaluates the nested body content of this tag if the value of the requested variable is less than or equal to the specified value. Less Than Evaluates the nested body content of this tag if the value of the requested variable is less than the specified value. Match Evaluates the nested body content of this tag if the specified value is an appropriate substring of the requested variable. Message Not Present Generates the nested body content of this tag if the specified message is not present in this request. Message Present Generates the nested body content of this tag if the specified message is present in this request. Not Empty Evaluates the nested body content of this tag if the requested variable is neither null nor an empty string nor an empty java.util.Collection (tested by the .isEmpty() method on the java.util.Collection interface). Not Equal Evaluates the nested body content of this tag if the requested variable is not equal to the specified value. Not Match Evaluates the nested body content of this tag if the specified value is not an appropriate substring of the requested variable. Not Present Generates the nested body content of this tag if the specified value is not present in this request. Present Generates the nested body content of this tag if the specified value is present in this request. Redirect Renders an HTTP Redirect.