title: Pop-up a generated PDF file using DispatcherServlet
body: <p>I've been googling a lot but I couldn't find anything helpful for my case.
  I need to pop-up a PDF document using Spring MVC <code>DispatcherServlet</code> after invoking a method that generates it with a <code>@RequestMapping</code>.</p>
  
  <p>Here's the code of how I generate the PDF File :</p>
  
  <pre><code>private MailMerge mailMerger = new MailMerge();
  Map&lt;String, String&gt; vars = new HashMap&lt;&gt;();
  vars.put("companyName", "TeamWill Consulting");
  vars.put("siret", "123456789");
  vars.put("financedAmount", "13500");
  vars.put("payment", "400");
  vars.put("duration", "36");
  File pdf = mailMerger.toPdf("Devis.docx", vars);
  </code></pre>