title: pass parameter from jsp to servlet
body: <p>how to pass a parameter from jsp to servlet using form which is not belong to any field of form without using session.i think code may be look like below example but doesn't work for me.plz help me.</p>
  
  <p>in index.jsp:-</p>
  
  <pre><code>&lt;form method="Post" action="servlet"&gt;
          &lt;input type="text" name="username"&gt;
          &lt;input type="password" name="password"&gt;
            &lt;% 
                int z=1;
                request.setAttribute("product_no", z);%&gt;
          &lt;input type='submit' /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>in servlet.java:-</p>
  
  <pre><code> int x=Integer.parseInt(request.getAttribute("product_no").toString());
  </code></pre>