title: How to open a pdf document from JSP
body: <p>How do I open a PDF document from JSP? I have many links to PDF files. In Eclipse, when I click on the link, the PDF opens in PDF reader. But in a webbrowser like Firefox and Chrome, nothing happens.</p>
  
  <p>I am generating the links to PDF files as <code>F:\....\...pdf</code> the following way:</p>
  
  <pre><code>&lt;%
      while (iter.hasNext()) {
          element = iter.next(); 
          bookName = getBookName(element);
  
  %&gt;
          &lt;ul&gt;
              &lt;li&gt;&lt;a href="&lt;%=element %&gt;"&gt;&lt;%=bookName %&gt;&lt;/a&gt;
          &lt;/ul&gt;
  &lt;% 
      }
  %&gt;
  </code></pre>
  
  <p>How is this problem caused and how can I solve it?</p>