Struts logic tags

This documentation describes the HTML elements that are available in the Struts Logic Tags drawer.

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 elements are listed in alphabetical order. Some elements may be hidden on the palette. To show a hidden element in the palette, right-click the Struts HTML Tags drawer and choose Customize. Remove the check next to Hide for each component that you want to display on the palette.

Each element has a number of properties you can set by using the element's Properties view. For an alphabetical listing and description of all the properties, refer to Properties for Struts bean elements. To look up properties for which you want additional detail, use the Attribute listings while working with the component's Properties view.

For each element in the table, the 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.
greaterEqual Evaluates the nested body content of this tag if the value of the requested variable is greater than or equal to the specified value.
greaterThan 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.
lessEqual Evaluates the nested body content of this tag if the value of the requested variable is less than or equal to the specified value.
lessThan 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.
messagesNotPresent Generates the nested body content of this tag if the specified message is not present in this request.
messagesPresent Generates the nested body content of this tag if the specified message is present in this request.
notEmpty 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).
notEqual Evaluates the nested body content of this tag if the requested variable is not equal to the specified value.
notMatch Evaluates the nested body content of this tag if the specified value is not an appropriate substring of the requested variable.
notPresent 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.

 

Related tasks

Adding Struts tags to a JSP file

Related reference
Struts bean tags
Struts HTML tags
Struts nested tags
Struts tiles tags
Struts drawers on the Web tools palette

Feedback