title: how to get value that is given in select tags from one jsp page to another jsp page
body: <p>Actually if i select an option like "company" and click on "submit" it will go to "view2.jsp" and using the option which i selected in "view1.jsp" i will display only that "company" data into either PDF,DOC,XLS,XLSX. Here i am using jasper reports in order to display data into PDF or DOC or XLS or XLSX.
  What i did was as follows</p>
  
  <p>view1.jsp</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;title&gt;Insert title here&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form method="POST" action="view2.jsp"&gt;
  &lt;select name="category"&gt;
  &lt;option value='company'&gt;company&lt;/option&gt;
  &lt;option value='institution'&gt;institution&lt;/option&gt;
  &lt;option value='hospital'&gt;hospital&lt;/option&gt;
  &lt;option value='Others'&gt;Others&lt;/option&gt;
  &lt;/select&gt;
  &lt;input type='submit' value="Given"&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>view2.jsp</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  pageEncoding="ISO-8859-1"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;title&gt;Insert title here&lt;/title&gt;
  &lt;script type="text/javascript"&gt;
  
      function setAction(nPage){
  
          document.forms[0].action = nPage;
      }
  
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;%
  String name;
  name = request.getParameter("category");
  %&gt;
  &lt;form&gt;
  &lt;select value="name" onchange="setAction(this.value)"&gt;
  &lt;option value=''&gt; Make a selection &lt;/option&gt;
  &lt;option value='PDF2.jsp'&gt; PDF&lt;/option&gt;
  &lt;option value='XLS2.jsp'&gt; XLS &lt;/option&gt;
  &lt;option value='DOC.jsp'&gt; DOC &lt;/option&gt;
  &lt;option value='XLSX2.jsp'&gt; XLSX &lt;/option&gt;
  &lt;/select&gt;
  &amp;nbsp;&amp;nbsp
  &lt;input type='submit' value="Submit"&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>But the problem i am facing is that i am not getting the option value that i selected in view1.jsp to view2.jsp and i am not getting the option data into PDF and DOC and XLS and XLSX.</p>