title: In html <a href> tag, how to call servlet before opening file dialog for download (save as)?
body: <p>I am developing a web-app where I want to provide a download link to users - so they can download a zip file from my server.
  Now, my requirement is that I want to execute some processing logic contained in a servlet before displaying the file dialog to the user for 'zip' files.</p>
  
  <p>So If I write</p>
  
  <pre><code>&lt;a href="abc.zip".......&gt;
  </code></pre>
  
  <p>then it opens a file dialog asking the user to select the location where this file can be saved</p>
  
  <p>But if I want a servlet's doGet method to do some preprocessing - say like building the zip file , then how can I first call the servlet and then open the file dialog.</p>
  
  <p>Will the following snippet work?</p>
  
  <pre><code> &lt;a href="MyHandlerServlet;abc.zip".......&gt;
  </code></pre>
  
  <p>Thanks for your help !!</p>