Struts Logic Tags examples.
- Introduction to Struts Logic Tags
Struts logic tags are conditional tags that replaces scriptlets in the jsp files.
- Logic Empty and notEmpty Tags
Tag evaluation of the nested body content occurs only if the specified value is either absent (i.e.null
), an empty string (i.e. ajava.lang.String
with a length of zero)
- Logic Equal and notEqual Tags
if the requested variable is equal to the specified value then this tag is used to evaluate the contents contained in the nested body parts of this tag
- Logic greaterEqual and greaterThan Tags
This tag compares the variable against the specified constant value. If the variable is greater than or equal to the specified value then the nested body contents of this tag is evaluated
- Logic lessEqual and lessThan Tags
This tag compares the variable against the specified constant value. If the variable is less than or equal to the specified value then the nested body contents of this tag is evaluated
- Logic match and notMatch Tags
This tag matches the variable specified as a String against the specified constant value. If the value is a substring then the nested body content of this tag is evaluated.
- Logic present and notPresent Tags
This tag checks the current request and depending on which attribute is specified, it evaluates the nested body content of this tag only if the specified value is present.