Mark,

Thank you very much for the reply...
To be honest, I am so new to Tomcat configuration that it is not fair to the
beginners to say that I am a beginner...

I have tried the pdf.xml file in /usr/local/Jakarta-tomcat-5/webapps. Before
testing, I did shutdown Tomcat and restart it. The file contains:
        <Context docBase="/usr/test/pdf" > </Context>

When I attempt to view a pdf file from within the application, the error I
receive is unable to open appname/jsp/app/C666119.pdf.

So I then copied pdf.xml to $CATALINA_HOME/webapps/appname/WEB-INF, shutdown
and restarted Tomcat, and I receive the same error message.

With both pdf.xml files in place, I then try your test below:
Open a browser, connect to ipaddress:port/pdf/C666119.pdf, and I receive
http error 404, the resource (/pdf/C666119.pdf) is unavailable. If I remove
the document name, the http error 404 remains; the resource is now /pdf.

This tomcat installation is 'out of the box'; I am unaware of any
customizations.

This is Tomcat 5.0.28 on AIX 5.2.


Regards,

-----Original Message-----
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 19, 2006 22:49
To: Tomcat Users List
Subject: Re: pdf documents

Bob Wyatt wrote:
> So I'm not sure what to do - any advice?

Create a pdf.xml file with the following contents and place it in your
${catalina.home}/webapps folder. Depending on your settings you may
need to restart Tomcat.

<Context docBase="/full/path/to/directory/of/pdf/docs" >
</Context>

This will create a new context called pdf that enables you to access
your pdf documents. Note that since you are setting the docBase, you
don't need to worry about allowLinking.

The pdfs should be accessible through:

http://host:port/pdf/

Note that with newer versions of Tomcat directory listing is disabled
so you will need to specify a pdf in order to get a response eg

http://host:port/pdf/mydoc.pdf

HTH,

Mark

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to