EL session object property
${sessionScope.pricer.applicableRateCode}
public class ViewPrices implements Cloneable, Serializable {
private static final long serialVersionUID = 1;
// fields
public List<RateCod开发者_JAVA技巧e> applicableRateCode = null;
}
javax.el.PropertyNotFoundException: Property 'applicableRateCode' not found on type com...ViewPrices
${sessionScope.pricer}
prints value but applicableRateCode won't print
You need to add a getter method to ViewPrices
. JSP EL requires them.
public class ViewPrices implements Cloneable, Serializable {
private static final long serialVersionUID = 1;
// fields
private List<RateCode> applicableRateCode = null;
public List<RateCode> getApplicableRateCode() {
return applicableRateCode ;
}
}
Setter/Getter are missing in the class . JSTL EL will access property using standard accessors methods
精彩评论