EL call boolean method on object
<p>I have a Java object User in my servlet, which I assign to the request parameter "user" in my JSP.</p>

<p>This user has a boolean method hasConfidentialAccess(), which returns true or false. I want to call this in my jsp like the following:</p>

<pre><code>&lt;c:if test="${user.hasConfidentialAccess}"&gt;
...
&lt;/c:if&gt;
</code></pre>

<p>But this doesn't work, my console throws following exception:</p>

<blockquote>
  <p>11:34:49,978 ERROR
  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/watson].[BasicSearchControllerServlet]]
  (http-/0.0.0.0:8080-7) JBWEB000236: Servlet.service() for servlet
  BasicSearchControllerServlet threw exception:
  javax.el.PropertyNotFoundException: The class
  'com.commons.framework.security.DefaultUser' does not have the
  property 'hasConfidentialAccess'.</p>
</blockquote>

<p>How to make this work?</p>