title: passing parameter from jsp to servlet through url pattern of servlet
body: <p>I got a requirement to send one parameter through url pattern of servlet (like we send through <code>&lt;a href="example.jsp?id=1"&gt;send&lt;/a&gt;</code>) in the same way I need it through url pattern.</p>
  
  <p>I do this with other possibilities like </p>
  
  <ol>
  <li>I can send that parameter as hidden type</li>
  <li>i can put in a request and session objects</li>
  </ol>
  
  <p>these methods are working fine no problem</p>
  
  <p>but through url it's not taking? I want to know whether it is possible or not?</p>
  
  <p>the code I have tried</p>
  
  <p>jsp page</p>
  
  <pre><code>&lt;a href="download?filename=&lt;%=filename%&gt;" target="_blank"&gt; &lt;font color="black"&gt;&lt;%=filename%&gt; &lt;/font&gt;&lt;/a&gt;
  </code></pre>
  
  <p>servlet code</p>
  
  <pre><code> String  filename=request.getParameter("filename");
  </code></pre>
  
  <p>and i need one answer can we pass parameter through url pattern if yes how? i.e like same as through <code>&lt;a href="example?id=1"&gt;send&lt;/a&gt;</code> or differently?</p>