title: removing data from session
body: <p>I am using the following code to remove a attribute from session </p>
  
  <pre><code>List&lt;User&gt; l=(List&lt;User&gt;) sess.getAttribute("allUserslist");
  for(int ii=0;ii&lt;l.size();ii++){
      System.out.println("bef"+l.get(ii).getLoginName()+optionSelected[i]);
      if(l.get(ii).getLoginName().equals(optionSelected[i])){
          System.out.println("in iteration");
          sess.removeAttribute(l.get(ii).getLoginName());
          List&lt;User&gt; l1=(List&lt;User&gt;) sess.getAttribute("allUserslist");
          System.out.println("final size"+l1.size());
      }
  }
  </code></pre>
  
  <p>The final size after removing is still one as before, where am I going wrong?</p>