title: Acessing objects in Session scope
body: <p>I am building a UI template &amp; hence no java files. However I need java objects , so I have class definition in my jsp only.I need to print gameState property of each object in "results" array. How to print it ?</p>
  
  <p>There is something wrong with this line " ${sessionScope['results'][innerItemNumber].gameState}[br]". I am not sure of the syntax.</p>
  
  <p>I get an error "javax.el.PropertyNotFoundException: Property 'gameState' not readable on type java.lang.String ".</p>
  
  <p>test.jsp:</p>
  
  <pre><code>&lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %&gt;
  &lt;% 
      class Result {
          String gameState;
          String result;
          String optional;
  
          public Result(String gameState, String result, String optional) {
              this.gameState = gameState;
              this.result = result;
              this.optional = optional;
          }....
          .....// Getters &amp; setters 
   }
  %&gt;
  
  &lt;%  java.util.ArrayList&lt;Result&gt; results = new java.util.ArrayList&lt;Result&gt;();
      results.add(new Result("Kick off", "14:00", ""));
      results.add(new Result("1st Half", "2-2", ""));
      results.add(new Result("1st Half", "2-1", ""));
      results.add(new Result("Peanalties", "3-6", "(1-1 FT)"));
      results.add(new Result("2nd Half", "2-0", ""));     
   %&gt;
  ....
  .....
  &lt;c:forEach items="0,1,2,3,4,5,6" var="innerItemNumber"&gt;  
  &lt;cell class="vertical-align-middle" width="33%" text-align="center"&gt;
  
          ${sessionScope['results'][innerItemNumber].gameState}[br]  ?????????
  
  &lt;/cell&gt;
  &lt;/c:forEach &gt; 
  </code></pre>