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 hello world
${'hello'} wo${'rld'} String hello world
${1+2}.${220} Double 3.22
${1+2}.${220} Double 3.22
000${1}${7} Long 17
000${1}${7} Long 17
${undefinedFoo}hello world${undefinedBar} String hello world
${undefinedFoo}hello world${undefinedBar} String hello world
${undefinedFoo}${undefinedBar} Double 0.0
${undefinedFoo}${undefinedBar} Double 0.0
${undefinedFoo}${undefinedBar} Long 0
${undefinedFoo}${undefinedBar} Long 0