I am using JSTL tags. i have below code.
Now variable refreshSent has boole
It is a String
.
The following JSP code:
${refreshSent} : ${refreshSent['class']}
${refreshSent2} : ${refreshSent2['class']}
${refreshSent3} : ${refreshSent3['class']}
Outputs the following in a browser:
false : class java.lang.String
false : class java.lang.Boolean
false : class java.lang.String
But if you use the refreshSent
variable in an EL expression where a boolean
is expected, it will be converted to a boolean
by a call to Boolean.valueOf(String)
(according to the JSP Specification).
So if you use:
the value of the test
attribute will be set to a boolean false
value. The ${refreshSent}
expression results in a String
, but since the test
attribute expects a boolean
, a call to Boolean.valueOf("false")
is made.