title: How to get list in jsp
body: <p>AI have this code:
  fileOne.java:
  ...</p>
  
  <pre><code>em.persist(new Item("A1","B1","C1","A.jpg","abc"));
  em.persist(new Item("A2","B2","C2","B.jpg","abc"));
  em.persist(new Item("A3","B3","C3","C.jpg","abc"));
  </code></pre>
  
  <p>...</p>
  
  <p>fileTwo.jsp:</p>
  
  <pre><code>@SuppressWarnings("unchecked")
              List&lt;Item&gt; myList = (List&lt;Item&gt;)request.getAttribute("Item");
  
              %&gt;
      &lt;span style="font-size: 150%; color: black; text-decoration: underline;"&gt;List:&lt;/span&gt;
      &lt;table id="Table" style="display:block;"&gt;
          &lt;tr&gt;
               &lt;th&gt;A&lt;/th&gt;
               &lt;th&gt;B&lt;/th&gt;
               &lt;th&gt;C&lt;/th&gt;
          &lt;/tr&gt;
          &lt;% if(myList != null){
              int counter = 0;
              for (Item Citem: myList ) { %&gt;
                 &lt;tr&gt; 
                  &lt;td id="viewA&lt;%=counter%&gt;" &gt;&lt;%= Citem.getA()%&gt;&lt;/td&gt;
                  &lt;td id="viewB&lt;%=counter%&gt;" &gt;&lt;%= Citem.getB()%&gt;&lt;/td&gt;
                  &lt;td id="viewC&lt;%=counter%&gt;" &gt;&lt;%= Citem.getC()%&gt;&lt;/td&gt;
                  &lt;td id="viewImage&lt;%=counter%&gt;"&gt;&lt;img alt="itemimg" src="ItemsImage&lt;%= Citem.getImageUrl() %&gt;" width="52" height="52"&gt;&lt;/td&gt;
                &lt;/tr&gt;
                &lt;% counter++;
                      }
                  }
              else{
                  %&gt;  Empty; 
                  &lt;%}
                %&gt;
  
      &lt;/table&gt;
  </code></pre>
  
  <p>...</p>
  
  <p>And I want to view the <code>List&lt;Item&gt;</code> in a table on my HTML page.
  and I get only "Empty" in the page (and the header "List").</p>
  
  <p>what am I doing wrong?</p>