此表达标签对我来说是正确的值<%= drug.NonAuthoritative%>
虽然我无法恢复毒品的价值。不可在C标签中使用
<c:if test="${drug.NonAuthoritative}"> <bean:message key="WriteScript.msgNonAuthoritative"></bean:message></c:if>
方法是
public Boolean NonAuthoritative() { return nonAuthoritative; }
有两个问题:
drug
${drug}
<% Drug drug = new Drug(); // ... request.setAttribute("drug", drug);
%>
${drug.propertyName}
getPropertyName()``isPropertyName()
public class Drug { private boolean nonAuthorative; public boolean isNonAuthorative() { return nonAuthorative; } // ...
}
与
<c:if test="${drug.nonAuthoritative}">
(注意外壳!)