I have a User object defined as follows:
public class User implements Serializable {
private String userId;
private boolean writeRole;
public User(String userId, boolean writeRole) {
this.userId = userId;
this.writeRole = writeRole;
}
public String getUserId() {
return userId;
}
public boolean hasWriteRole() {
return writeRole;
}
}
I have added an instance of this object to the httpsession.
in the JSP I am using JSTL to retrieve the writeRole property:
<c:if test="${sessionScope.adminuser.readRole}" >
This is throwing a compiler error javax.servlet.jsp.el.ELException: Unable to find a value for "writeRole" in object of class "com.examples.User" using operator "."
how can I access this value using JSTL?
Thanks In advance