This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Skip to end of metadata
Go to start of metadata

Please make sure you have read the Tag Syntax document and understand how tag attribute syntax works.


Perform basic condition flow. 'If' tag could be used by itself or can be followed by zero or more 'Else if' Tags followed by zero or one 'Else' Tag.




  • No labels


  1. when you test a string which has only one char (or more, I haven't tested), you should use double quotes instead of single quote, because it will cause error:

    Caught an exception while evaluating expression 'wed == 'Y'' against value stack
    java.lang.NumberFormatException: For input string: "N"

    Solution: change single quote to double quotes
    <s:iterator value="meetings">
    <s:if test="%

    Unknown macro: {wed == 'Y'}

    <s:iterator value="meetings">
    <s:if test='%

    Unknown macro: {wed == "Y"}



    Root cause:
    newton.dave wrote:
    > IIRC a single-character in single quotes will evaluate to a character, not
    > a
    > string. Not entirely sure I get the exception without looking at the
    > source.

    1. This is in the FAQ and other places in the documentation.

      Multiple characters can be placed in single-quotes; it's only when it's a single character in single quotes.