You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Kist, Paul" <pa...@merck.com> on 2004/03/25 20:08:43 UTC

Readers, DatabaseReader, and MimeTypes

I am having an issue concerning Mime-Types and the DatabaseReader (and
readers in general)
I am trying to read PDFs from a database, as well as from the file system,
and in both cases, the PDF gets streamed into the browser, and Acrobat is
not being launched.   For some reason the correct mime-type is not being
recognized by (or maybe even sent to) the browser.

I checked the cocoon source, and it doesn't seem as if any specific
mime-type is being sent to the browser.  Is there something that I am
overlooking.  I've gone through practically every list, and I haven't come
across anyone with a similar problem.  

My web.xml is configured so unknown mime types would be accepted by the
browser as "application/octet-stream" which would trigger a "Save/Open"
dialogue box, but that isn't happening either.


Here is my pipeline for the database reader:

        <map:match pattern="*/securedoc/**.pdf">
          <map:read type="databasereader" src="{2}"
mime-type="application/pdf">
            <map:parameter name="table" value="my_table"/>
            <map:parameter name="image" value="my_column"/>
            <map:parameter name="key" value="file_name"/> 
            <map:parameter name="content-type" value="application/pdf"/>
          </map:read>
        </map:match>
    
Here is my pipeline for the 
        
          <map:match pattern="*/pdfdoc/**.pdf">
              <map:read src="pdf/UserGuide.pdf" mime-type="application/pdf">
              </map:read>
        </map:match>

Any suggestions would be greatly appreciated.  Thanks.

-Paul Kist


------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message.  If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.
------------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org