This expression tag outpus a correct value for me
<%=drug.NonAuthoritative%>
while I cant recover the value of drug.NonAuthoritative for use in a C tag
<c:if test="${drug.NonAuthoritative}"> <bean:message key="WriteScript.msgNonAuthoritative"></bean:message></c:if>
the method is
public Boolean NonAuthoritative() {
return nonAuthoritative;
}
There are 2 problems:
Scriptlets and EL do not share the same scope. The
drugin${drug}has to match the name of an existing attribute in the page, request, session or application scope. If you’re preparingdrugin a scriptlet instead of in a controller, then you should put it as an attribute in one of those scopes yourself.(as partly answered by Nathan), EL relies on Javabeans specification. The
${drug.propertyName}requires a public methodgetPropertyName()for non-boolean properties orisPropertyName()for boolean properties. So, this should dowith
(pay attention to the casing!)