title: passing values using jquery or ajax to another page
body: <p>I am trying to pass value from one JSP page to another page using jquery.In below code I would like to pass the variable "processId"  to another page. The value should pass to another page after the below JSP page is loaded. </p>
  
  <p>I am getting error: "procId is undefined"</p>
  
  <pre><code>&lt;head&gt;
  &lt;script type="text/javascript" src="jqwidgets/scripts/jquery-1.8.1.min.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
  window.onload=passValue;
  function passValue()
  {
  $.post("Testing.jsp", {processId: ""+procId+""});
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;%
  String processId = "555";
  %&gt;
  &lt;form name="fm" id="fm"&gt;
  &lt;input  type="hidden" id="procId" value="&lt;%=processId%&gt;" name="processId"&gt;
  &lt;/form&gt;
  &lt;/html&gt;
  </code></pre>