title: Confused with Session's getAttribute and setAttribute methods
body: <p>I used the <code>session.set/getAttribute()</code> to pass my <code>HashMap</code> to another servlet. On my next servlet, I will add a value to my <code>HashMap</code> but when I search for the value, it can't be read. Why is it not working? </p>
  
  <p>I am setting it as follows:</p>
  
  <pre><code>session.setAttribute("itemList", itemList);
  </code></pre>
  
  <p>And I am retrieving it as follows:</p>
  
  <pre><code>HashMap itemList = (HashMap)session.getAttribute("itemList");
  itemList.put(stockNo, item);
  session.setAttribute("itemList", itemList);
  </code></pre>
  
  <p>Is this correct?</p>