Ravi Parekh
Ravi Parekh

Reputation: 5622

EL session object property

${sessionScope.pricer.applicableRateCode}

public class ViewPrices implements Cloneable, Serializable {    
    private static final long serialVersionUID = 1;
    // fields      
    public List<RateCode> applicableRateCode = null;
}

javax.el.PropertyNotFoundException: Property 'applicableRateCode' not found on type com...ViewPrices

${sessionScope.pricer} prints value but applicableRateCode won't print

Upvotes: 1

Views: 451

Answers (2)

skaffman
skaffman

Reputation: 403581

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 ;
    }
}

Upvotes: 4

Jigar Joshi
Jigar Joshi

Reputation: 240956

Setter/Getter are missing in the class . JSTL EL will access property using standard accessors methods

Upvotes: 2

Related Questions