title: How to get all Session values and names?
body: <p>if i have values in a session and i need to get all the values in a session like</p>
  
  <pre><code>String[] name = request.getParameterValues("values");
  HttpSession session = request.getSession();
  
  for(String temp:name)
  {
      if(temp.equalsIgnoreCase("a"))
      {
          session.setAttribute("a", temp);
          out.println("a is Running&lt;br&gt;");
      }
  
      if(temp.equalsIgnoreCase("b"))
      {
          session.setAttribute("b", temp);
          out.println("b is Running&lt;br&gt;");
      }
  
      if(temp.equalsIgnoreCase("c"))
      {
          session.setAttribute("c", temp);
          out.println("c is Running&lt;br&gt;");
      }
  
      if(temp.equalsIgnoreCase("d"))
      {
          session.setAttribute("d", temp);
          out.println("d is Running&lt;br&gt;");
      }
  
      if(temp.equalsIgnoreCase("e"))
      {
          session.setAttribute("e", temp);
          out.println("e is Running&lt;br&gt;");
      }
  
      if(temp.equalsIgnoreCase("f"))
      {
          session.setAttribute("f", temp);
          out.println("f is Running&lt;br&gt;");
      }
  }
  </code></pre>
  
  <ul>
  <li>if I get a set of checkbox values to a string. Im setting all the
  values which are selected in a .jsp to a session object. I need to
  retrieve only the selected values in a jsp which are saved in the
  above code.</li>
  </ul>