Originally posted by Felipe Pittella:
Please folks, help me here:
If we have this:
<%@ taglib prefix="/WEB-INF/tlds/core.tld" uri="c" %>
<% int result = 1; %>
<c:if test="${2>1}" var="result"></c:if>
Result: ${result}
According to the mock tool�s answer, it would be "Result: true".
My question is..is that correct even if it�s a "int" primitive type?
Tks.
In the abve if statement The var="result" will create a page scope variable (attribute). In the EL ${result} the value stored in page scope variable is accessed. The int result is not used anyway.
Thanks
Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0