title: session.getAttribute() in JSP is giving null value
body: <p>Here is my HTML code in JSP
  </p>
  
  <pre><code>&lt;select name="urlsel" id="selurl"&gt;
  &lt;option value="eng" name="eng"/&gt;
  &lt;option value="mat" name="mat"/&gt;
  &lt;option value="sci" name="sci"/&gt;
  &lt;/select&gt;
  &lt;input type="submit" value="submit option" onsubmit="return validate()"/&gt;
  &lt;%  String opt=session.getAttribute("urlsel");
      System.out.println("\n selected optiion is:+opt)
  %&gt;
  </code></pre>
  
  <p>The above JSP code is giving <strong>null</strong> value for <strong>opt</strong>. I tried with <code>request.getParameter("urlsel");</code> in JSP still getting <strong>null</strong>.</p>
  
  <p>I want the selected option value answer with <code>session.getAttribute("urlsel");</code></p>
  
  <p>How can I get it? I want this value in my servlet and in servlet using <code>session.getAttribute("urlsel");</code><br>
  but getting null.</p>
  
  <p>Please help me.</p>