1 Reply Latest reply on Nov 19, 2009 2:21 PM by Nikos Paraskevopoulos

    Seam-pdf - static file download

    I need a real name Newbie

      Hi all

      i'm using seam-pdf to create dynamic pdf documents, this way i map all .pdf requests to Document Store Servlet. But i need to provide access to simple static pdf files too - a request to static pdf file gets redirected to Document Store Servlet and of course Document Store can't return a static pdf file for me. What could be a solution to this problem? How do i provide access to static pdf file download and create dynamic pdf files in one context?

        • 1. Re: Seam-pdf - static file download
          Nikos Paraskevopoulos Novice


          You could:

          1. Prefix-map the Document Store Servlet and then apply a servlet filter to it that will reject (HTTP 404) any request that doesn't end in .pdf. Then the servlet container will use the standard download

          2. The servlet spec requires that prefix matches before suffix (see chapter Mapping Requests to Servlets). So you could create a simple download servlet, prefix-map it to some path and let it send files that exist to the client. This servlet will take precedence over the Document Store Servlet.