I have an instance of the following object in the jsp page context:
Class User{ private boolean isAdmin; public boolean isAdmin(){return isAdmin} }
How can I query the isAdmin property from the EL? This doesn’t seem to work:
${user.admin}
nor does this:
${user.isAdmin}
thanks!
-Morgan
Ok. I’m stupid. Vote this question down, ridicule me, etc. The problem was in the method that isAdmin() was delegating to. There was a null pointer exception in that method. In my defense, however, I’ll say that the stack trace I got was a bit unclear, and made it look like it was an EL issue rather than a simple null pointer in my code.
Vinegar, your assurances that isAdmin() works even without a property did help me figure this out. Thanks for that.