title: org.apache.jasper.JasperException/javax.el.PropertyNotFoundException:
body: <p>I am new to Java web application. I have been using a tutorial to learn Java. I am stuck when trying to use jstl tag. I have a category table with two fields, i.e. "Name" and "id". Name of the category and name of the image file I use are the same. Here is the source code. When I try to run the application it shows the following error:</p>
  
  <pre><code>HTTP Status 500 - Internal Server Error
  
  type Exception report
  
  messageInternal Server Error
  
  description
      The server encountered an internal error that prevented it from fulfilling this request.
  
  exception
      org.apache.jasper.JasperException: javax.el.PropertyNotFoundException: The class 'java.lang.String' does not have the property 'id'.
  
  root cause
      javax.el.PropertyNotFoundException: The class 'java.lang.String' does not have the property 'id'.
  
  note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 4.0 logs.
  GlassFish Server Open Source Edition 4.0 
  </code></pre>
  
  <p>I have added javax.servlet.jsp.jstl-api-1.2.1-javadoc.jar and jstl-impl-1.2.jar file in lib folder under WEB-INF folder. But still I encounter the above problem. Could anyone help me out with this.</p>
  
  <p>Here is my code of index.jsp. I have deployed application in glassfish server 4.0</p>
  
  <pre><code>&lt;%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%&gt;
  &lt;%@taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%&gt;
  &lt;%-- 
      Document   : index
      Created on : Feb 18, 2014, 1:18:40 PM
      Author     : sabin
  --%&gt;
  
  &lt;sql:query var="categories" dataSource="jdbc/affablebean"&gt;
      SELECT * FROM category
  &lt;/sql:query&gt;
  
  &lt;div id="indexLeftColumn"&gt;
      &lt;div id="welcomeText"&gt;
          &lt;p&gt;[ welcome text ]&lt;/p&gt;
          categoryImagePath:${initParam.categoryImagePath}
          productImagePath:${initParam.productImagePath}
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div id="indexRightColumn"&gt;
      &lt;c:forEach var="category" items="$(categories.rows}"&gt;
          &lt;div class="categoryBox"&gt;
              &lt;a href="category?${category.id}"&gt;
                  &lt;span class="categoryLabelText"&gt;${category.name}&lt;/span&gt;
                  &lt;img src="${initParam.categoryImagePath}${category.name}.jpg" alt="${category.name}"&gt;
              &lt;/a&gt;
          &lt;/div&gt;
      &lt;/c:forEach&gt;
  &lt;/div&gt;
  </code></pre>