title: How to set a value of textfield as a session attribute in jsp before rendering?
body: <p>suppose I have code</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;script&gt;
          function ses()
          {
          var r=document.getElementById("rollno").value;
          session.setAttribute("rollno",r);
          }
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form action="process.jsp"&gt;
          RollNO: &lt;input type="text" name="rollno" id="rollno" onblur=ses()&gt;
          Admission no&lt;input type="text" name="anum" id="anum"&gt;
          &lt;input  type="submit" value="Next"/&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I want to set session attribute as rollno is entered in textfield but before submitting the form .
  There is any alternate for the code for storing session without submitting form.</p>