title: javax.el.PropertyNotFoundException: The class 'java.lang.String' does not have the property
body: <p>I am creating  Sample Spring MVC application. In my Controller class I have define like this:</p>
  
  <pre><code>Map&lt;String, Object&gt; myModel = new HashMap&lt;String, Object&gt;();
          myModel.put("now", now);
          myModel.put("products", this.productManager.getProducts());
  
          return new ModelAndView("hello", "model", myModel);
  </code></pre>
  
  <p>When I put following part in my JSP file i got <code>javax.el.PropertyNotFoundException</code> exception</p>
  
  <pre><code>&lt;c:forEach items="${model.products}" var="prod"&gt;
          &lt;c:out value="${prod.description}"/&gt; &lt;i&gt;$&lt;c:out value="${prod.price}"/&gt;&lt;/i&gt;&lt;br&gt;&lt;br&gt;
      &lt;/c:forEach&gt;
  </code></pre>
  
  <p>Here is my full exception :</p>
  
  <pre><code>javax.el.PropertyNotFoundException: The class 'java.lang.String' does not have the property 'description'.
  </code></pre>
  
  <p>But in  my domain class <code>private Sting description</code> property has public getter and setter. That <code>Product</code> class is public one. </p>
  
  <p>Product class:</p>
  
  <pre><code>public class Product implements Serializable {
      private String description;
      private Double price;
  
      public String getDescription() {
          return description;
      }
  
      public void setDescription(String description) {
          this.description = description;
      }
  
      public Double getPrice() {
          return price;
      }
  
      public void setPrice(Double price) {
          this.price = price;
      }
  
  }
  </code></pre>
  
  <p><strong>PS:</strong></p>
  
  <p>If I used like this it's working</p>
  
  <pre><code>&lt;c:forEach items="${model.products}" var="prod"  varStatus="status"&gt;        
          &lt;c:out value="${model.products[status.count -1].description}"/&gt; &lt;i&gt;$&lt;c:out value="${model.products[status.count -1].price}"/&gt;&lt;/i&gt;&lt;br&gt;&lt;br&gt;
      &lt;/c:forEach&gt; 
  </code></pre>
  
  <p>But recommended solution not working :(  </p>