title: Store a java script value in jsp String variable
body: <p>Can anyone help me to solve my simple problem of my jsp code?
  here is my jsp page with JavaScript </p>
  
  <pre><code>function fid()
  {
      var id=document.getElementById("id").value;
      alert(id);
      &lt;%
               String demo=id;             // store id value of java script but not working
               or find(id);                // or call a function with parameter of java script var value
                                         // both are not working
       %&gt;
  }
  </code></pre>
  
  <p>here is my html page --</p>
  
  <pre><code>Enter Student Id&lt;input type='text' id='id'&gt;&lt;button type='button' onclick='fid()'&gt;Find&lt;/button&gt;
  </code></pre>
  
  <p>How do I pass the js value in jsp function.<br>
  I know that I can do this with ajax or jquery but I don't know these languages. Any suggestions or code snippets are welcome.</p>