<%@ taglib prefix="my" uri="http://tomcat.apache.org/example-taglib" %> JSP 2.0 Expression Language - Composite Expressions

JSP 2.0 Expression Language - Composite Expressions


This example illustrates EL composite expressions. Composite expressions are formed by grouping together multiple EL expressions. Each of them is evaluated from left to right, coerced to String, all those strings are concatenated, and the result is coerced to the expected type.
EL Expression Type Result
\${'hello'} wo\${'rld'} String ${values.stringValue}
\${'hello'} wo\${'rld'} String
\${1+2}.\${220} Double ${values.doubleValue}
\${1+2}.\${220} Double
000\${1}\${7} Long ${values.longValue}
000\${1}\${7} Long
\${undefinedFoo}hello world\${undefinedBar} String ${values.stringValue}
\${undefinedFoo}hello world\${undefinedBar} String
\${undefinedFoo}\${undefinedBar} Double ${values.doubleValue}
\${undefinedFoo}\${undefinedBar} Double
\${undefinedFoo}\${undefinedBar} Long ${values.longValue}
\${undefinedFoo}\${undefinedBar} Long