title: Spring AbstractPdfView display already created pdf in the browser
body: <p>I have 2 pdf files already created.  They are in the following folder <code>WebContent/pdf/</code></p>
  
  <p>I have extended Spring's AbstractPdfView before to make a pdf on the fly.</p>
  
  <p>This time I want to use it to </p>
  
  <p>1) display an already created pdf and
  2) use itext to pass a model object to the second pdf and fill already created pdf form fields.</p>
  
  <p>I know with 1) I can just create a link and access the pdf directly.  I was trying to access it via extending AbstractPdfView since I believe that I need to use that for case 2). </p>
  
  <p>I am just not sure how to get the resource and then display it in the browser with this class.</p>
  
  <p>Can anyone please show me how to accomplish this with a sample?</p>
  
  <p>spring-pdf-views.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"&gt;
  
      &lt;bean id="BlankPDF" class="com.example.BlankPDF"/&gt;
      &lt;bean id="PopulatedPDF" class="com.example.PopulatedPDF"/&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>spring-servlet.xml</p>
  
  <pre><code>&lt;bean id="xmlViewResolver" class="org.springframework.web.servlet.view.XmlViewResolver"&gt;
      &lt;property name="order" value="1"/&gt;
      &lt;property name="location"&gt;
          &lt;value&gt;/WEB-INF/spring-pdf-views.xml&lt;/value&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>