Hi,
in EL expression in JSP we can use ${"1"+"2"} but not ${"Dark"+"Knight"}. Why?
Hi,
in EL expression in JSP we can use ${"1"+"2"} but not ${"Dark"+"Knight"}. Why?
The JSP 2.1 (2006) spec defines + as an arithmetic operator only, so it cannot be used for string concatenation. "1" and "2" are coerced to numerical types according to the rules for coercion, so ${"1"+"2"} will evaluate to 3.