Common JSP EL examples

Here are a few commonly used JSP EL examples that you can use in your Correspondence Management solution:

  • To add two numbers:

    ${number1 + number2}
  • To concatenate two strings:

    ${str1} ${str2}
  • To compare two numbers:

    ${age < 18}
You can find more information in the JSP EL specification. The client-side expression manager does not support certain variables and functions in the JSP EL specification, specifically:
  • Collection indexes and map keys (using the [] notation) are not supported in variable names for expressions evaluated on the client-side.

  • Complex types are currently not supported as parameter types or return types of functions used in expressions. The only allowed types are:

    • java.lang.String

    • java.lang.Character

    • char

    • java.lang.Boolean

    • boolean

    • java.lang.Integer

    • int

    • java.lang.Short

    • short

    • java.lang.Byte

    • byte

    • java.lang.Double

    • double

    • java.lang.Long

    • long

    • java.lang.Float

    • float

    • java.util.Calendar

    • java.util.Date

// Ethnio survey code removed