title: How to call action with parameters of JSP Servlet from JavaScript?
body: <pre><code>function printthis()
  { 
   var content_vlue = document.getElementById('print_content').innerHTML;
   var target= 'printValue?value1='+content_vlue;
   document.forms[0].action = target;
   document.forms[0].submit();
  }
  </code></pre>
  
  <p><code>&lt;div id="print_content"&gt;hello i am good&lt;/div&gt;</code></p>
  
  <p>For frontend I am using JSP. While executing this code to get the value in servlet</p>
  
  <pre><code>String msg = request.getParameter("value1");
  </code></pre>
  
  <p>While executing this code the browser url changes to <strong><em>printValue?</em></strong></p>
  
  <p>But I am unable to get the value of <em>value1</em> </p>
  
  <p>Please suggest me...</p>