You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bob Wyatt <bw...@comcast.net> on 2006/06/20 02:42:42 UTC
pdf documents
I have a directory that contains hundreds of pdf files.
I have Tomcat 5.0.28 running on AIX 5.2.
Under the webapps/appname directory, if I create a symbolic link to the pdf
files, they will not display.
If I move the pdf to the webapps/appname directory, it will display just
fine.
I don't want to move the hundreds of pdf files the appname directory.
How can I make this work?
Regards,
Bob
RE: pdf documents
Posted by Bob Wyatt <bw...@comcast.net>.
I'm afraid not...
Regards,
Bob
-----Original Message-----
From: Mladen Adamovic [mailto:adamm@blic.net]
Sent: Tuesday, June 20, 2006 18:15
To: Tomcat Users List
Subject: Re: pdf documents
Bob Wyatt wrote:
> If I move the pdf to the webapps/appname directory, it will display just
> fine.
>
>
> I don't want to move the hundreds of pdf files the appname directory.
>
Do the following work?
Create webapps/appname/pdf as a symbolic link directory to
/whatever/you/want/path/to/pdf
?
--
Mladen Adamovic
http://www.online-utility.org http://www.shortopedia.com
http://www.froola.com http://www.gift-idea4u.com
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: pdf documents
Posted by Mladen Adamovic <ad...@blic.net>.
Bob Wyatt wrote:
> If I move the pdf to the webapps/appname directory, it will display just
> fine.
>
>
> I don't want to move the hundreds of pdf files the appname directory.
>
Do the following work?
Create webapps/appname/pdf as a symbolic link directory to
/whatever/you/want/path/to/pdf
?
--
Mladen Adamovic
http://www.online-utility.org http://www.shortopedia.com
http://www.froola.com http://www.gift-idea4u.com
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: pdf documents
Posted by Suba Suresh <su...@wolfram.com>.
I will try googling. I have been struggling with it for sometime even
playing with context.xml file.
thanks,
suba suresh.
David Smith wrote:
> I can put something together, but not until tonight -- it'll take too
> long to do at work. In the meantime, feel free to google. This is such
> a simple item I'm sure someone has done it before and posted their
> experiences.
>
> --David
>
> Suba Suresh wrote:
>
>> I am in the same boat as Bob. I already have a servlet displaying the
>> filenames to select from. My servlet is mapped to a different name in
>> web.xml file. How should I proceed. Should I have another new servlet?
>> What about for different file formats. Should it also be mapped?
>>
>> thanks,
>> suba suresh.
>>
>> David Smith wrote:
>>
>>> I would recommend a servlet that streams the files from some
>>> configured absolute path(s) to the client. It's reasonably simple
>>> and allows you some degree of control over what is delivered. Map
>>> the servlet to *.pdf in your web.xml to make it respond to all
>>> requests for pdfs.
>>>
>>> --David
>>>
>>> Bob Wyatt wrote:
>>>
>>>> For the client side, sure.
>>>> I already know it works if I copy the pdf file under my tomcat
>>>> application... I just don't want to move hundreds of files there...
>>>>
>>>> Regards,
>>>>
>>>> Bob
>>>>
>>>> -----Original Message-----
>>>> From: Martin Gainty [mailto:mgainty@hotmail.com] Sent: Tuesday, June
>>>> 20, 2006 07:30
>>>> To: Tomcat Users List
>>>> Subject: Re: pdf documents
>>>>
>>>> Those files are in a proprietary format..you'll need to go to adobe
>>>> and get the PDF plugin/viewer for display-
>>>> M-
>>>> This email message and any files transmitted with it contain
>>>> confidential
>>>> information intended only for the person(s) to whom this email
>>>> message is
>>>> addressed. If you have received this email message in error, please
>>>> notify
>>>> the sender immediately by telephone or email and destroy the original
>>>> message without making a copy. Thank you.
>>>>
>>>> ----- Original Message ----- From: "Suba Suresh" <su...@wolfram.com>
>>>> To: "Tomcat Users List" <us...@tomcat.apache.org>
>>>> Sent: Monday, June 19, 2006 10:28 PM
>>>> Subject: Re: pdf documents
>>>>
>>>>
>>>>
>>>>
>>>>> I have the same problem as Bob but files mapping into different
>>>>> file systems. I also tried the context mapping as you (Mark)had
>>>>> suggested with app.xml file. I will read about the link config
>>>>> tomorrow and try it. Any help would be appreciated.
>>>>>
>>>>> thanks,
>>>>> suba suresh.
>>>>>
>>>>> Bob Wyatt wrote:
>>>>>
>>>>>
>>>>>> Mark,
>>>>>>
>>>>>> No... Didn't know about it...
>>>>>> Now that I know about it (Thank You), I'm not sure of what really
>>>>>> needs to
>>>>>> be done... No where under $CATALINA_HOME do I have a
>>>>>> defaultcontext.xml, context.xml,
>>>>>> or similarly named file. All of my similarly named files are
>>>>>> *.html files
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>> or
>>>>>> directories, as follows:
>>>>>>
>>>>>> #pwd
>>>>>> /usr/local/jakarta-tomcat-5
>>>>>> # find . -name \*context\* -print
>>>>>> ./server/webapps/admin/context
>>>>>> ./server/webapps/admin/defaultcontext
>>>>>> ./webapps/tomcat-docs/config/printer/context.html
>>>>>> ./webapps/tomcat-docs/config/printer/defaultcontext.html
>>>>>> ./webapps/tomcat-docs/config/context.html
>>>>>> ./webapps/tomcat-docs/config/defaultcontext.html
>>>>>> ./webapps/wade2/scripts/contextmenu.css
>>>>>>
>>>>>> So I'm not sure what to do - any advice?
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Bob
>>>>>> -----Original Message-----
>>>>>> From: Mark Thomas [mailto:markt@apache.org] Sent: Monday, June 19,
>>>>>> 2006 21:13
>>>>>> To: Tomcat Users List
>>>>>> Subject: Re: pdf documents
>>>>>>
>>>>>> Bob Wyatt wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> I have a directory that contains hundreds of pdf files.
>>>>>>>
>>>>>>> I have Tomcat 5.0.28 running on AIX 5.2.
>>>>>>>
>>>>>>> Under the webapps/appname directory, if I create a symbolic link
>>>>>>> to the
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> pdf
>>>>>>
>>>>>>
>>>>>>
>>>>>>> files, they will not display.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Have you enabled linking? See the allowLinking property at
>>>>>> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
>>>>>>
>>>>>> Mark
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: pdf documents
Posted by David Smith <dn...@cornell.edu>.
I can put something together, but not until tonight -- it'll take too
long to do at work. In the meantime, feel free to google. This is such
a simple item I'm sure someone has done it before and posted their
experiences.
--David
Suba Suresh wrote:
> I am in the same boat as Bob. I already have a servlet displaying the
> filenames to select from. My servlet is mapped to a different name in
> web.xml file. How should I proceed. Should I have another new servlet?
> What about for different file formats. Should it also be mapped?
>
> thanks,
> suba suresh.
>
> David Smith wrote:
>
>> I would recommend a servlet that streams the files from some
>> configured absolute path(s) to the client. It's reasonably simple
>> and allows you some degree of control over what is delivered. Map
>> the servlet to *.pdf in your web.xml to make it respond to all
>> requests for pdfs.
>>
>> --David
>>
>> Bob Wyatt wrote:
>>
>>> For the client side, sure.
>>> I already know it works if I copy the pdf file under my tomcat
>>> application... I just don't want to move hundreds of files there...
>>>
>>> Regards,
>>>
>>> Bob
>>>
>>> -----Original Message-----
>>> From: Martin Gainty [mailto:mgainty@hotmail.com] Sent: Tuesday, June
>>> 20, 2006 07:30
>>> To: Tomcat Users List
>>> Subject: Re: pdf documents
>>>
>>> Those files are in a proprietary format..you'll need to go to adobe
>>> and get the PDF plugin/viewer for display-
>>> M-
>>> This email message and any files transmitted with it contain
>>> confidential
>>> information intended only for the person(s) to whom this email
>>> message is
>>> addressed. If you have received this email message in error, please
>>> notify
>>> the sender immediately by telephone or email and destroy the original
>>> message without making a copy. Thank you.
>>>
>>> ----- Original Message ----- From: "Suba Suresh" <su...@wolfram.com>
>>> To: "Tomcat Users List" <us...@tomcat.apache.org>
>>> Sent: Monday, June 19, 2006 10:28 PM
>>> Subject: Re: pdf documents
>>>
>>>
>>>
>>>
>>>> I have the same problem as Bob but files mapping into different
>>>> file systems. I also tried the context mapping as you (Mark)had
>>>> suggested with app.xml file. I will read about the link config
>>>> tomorrow and try it. Any help would be appreciated.
>>>>
>>>> thanks,
>>>> suba suresh.
>>>>
>>>> Bob Wyatt wrote:
>>>>
>>>>
>>>>> Mark,
>>>>>
>>>>> No... Didn't know about it...
>>>>> Now that I know about it (Thank You), I'm not sure of what really
>>>>> needs to
>>>>> be done... No where under $CATALINA_HOME do I have a
>>>>> defaultcontext.xml, context.xml,
>>>>> or similarly named file. All of my similarly named files are
>>>>> *.html files
>>>>>
>>>>
>>>
>>>
>>>
>>>
>>>>> or
>>>>> directories, as follows:
>>>>>
>>>>> #pwd
>>>>> /usr/local/jakarta-tomcat-5
>>>>> # find . -name \*context\* -print
>>>>> ./server/webapps/admin/context
>>>>> ./server/webapps/admin/defaultcontext
>>>>> ./webapps/tomcat-docs/config/printer/context.html
>>>>> ./webapps/tomcat-docs/config/printer/defaultcontext.html
>>>>> ./webapps/tomcat-docs/config/context.html
>>>>> ./webapps/tomcat-docs/config/defaultcontext.html
>>>>> ./webapps/wade2/scripts/contextmenu.css
>>>>>
>>>>> So I'm not sure what to do - any advice?
>>>>>
>>>>> Regards,
>>>>>
>>>>> Bob
>>>>> -----Original Message-----
>>>>> From: Mark Thomas [mailto:markt@apache.org] Sent: Monday, June 19,
>>>>> 2006 21:13
>>>>> To: Tomcat Users List
>>>>> Subject: Re: pdf documents
>>>>>
>>>>> Bob Wyatt wrote:
>>>>>
>>>>>
>>>>>
>>>>>> I have a directory that contains hundreds of pdf files.
>>>>>>
>>>>>> I have Tomcat 5.0.28 running on AIX 5.2.
>>>>>>
>>>>>> Under the webapps/appname directory, if I create a symbolic link
>>>>>> to the
>>>>>>
>>>>>
>>>>>
>>>>> pdf
>>>>>
>>>>>
>>>>>
>>>>>> files, they will not display.
>>>>>>
>>>>>
>>>>>
>>>>> Have you enabled linking? See the allowLinking property at
>>>>> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
>>>>>
>>>>> Mark
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: pdf documents
Posted by Suba Suresh <su...@wolfram.com>.
I am in the same boat as Bob. I already have a servlet displaying the
filenames to select from. My servlet is mapped to a different name in
web.xml file. How should I proceed. Should I have another new servlet?
What about for different file formats. Should it also be mapped?
thanks,
suba suresh.
David Smith wrote:
> I would recommend a servlet that streams the files from some configured
> absolute path(s) to the client. It's reasonably simple and allows you
> some degree of control over what is delivered. Map the servlet to *.pdf
> in your web.xml to make it respond to all requests for pdfs.
>
> --David
>
> Bob Wyatt wrote:
>
>> For the client side, sure.
>> I already know it works if I copy the pdf file under my tomcat
>> application... I just don't want to move hundreds of files there...
>>
>> Regards,
>>
>> Bob
>>
>> -----Original Message-----
>> From: Martin Gainty [mailto:mgainty@hotmail.com] Sent: Tuesday, June
>> 20, 2006 07:30
>> To: Tomcat Users List
>> Subject: Re: pdf documents
>>
>> Those files are in a proprietary format..you'll need to go to adobe
>> and get the PDF plugin/viewer for display-
>> M-
>> This email message and any files transmitted with it contain confidential
>> information intended only for the person(s) to whom this email message is
>> addressed. If you have received this email message in error, please
>> notify
>> the sender immediately by telephone or email and destroy the original
>> message without making a copy. Thank you.
>>
>> ----- Original Message ----- From: "Suba Suresh" <su...@wolfram.com>
>> To: "Tomcat Users List" <us...@tomcat.apache.org>
>> Sent: Monday, June 19, 2006 10:28 PM
>> Subject: Re: pdf documents
>>
>>
>>
>>
>>> I have the same problem as Bob but files mapping into different file
>>> systems. I also tried the context mapping as you (Mark)had suggested
>>> with app.xml file. I will read about the link config tomorrow and try
>>> it. Any help would be appreciated.
>>>
>>> thanks,
>>> suba suresh.
>>>
>>> Bob Wyatt wrote:
>>>
>>>
>>>> Mark,
>>>>
>>>> No... Didn't know about it...
>>>> Now that I know about it (Thank You), I'm not sure of what really
>>>> needs to
>>>> be done... No where under $CATALINA_HOME do I have a
>>>> defaultcontext.xml, context.xml,
>>>> or similarly named file. All of my similarly named files are *.html
>>>> files
>>>>
>>
>>
>>
>>
>>>> or
>>>> directories, as follows:
>>>>
>>>> #pwd
>>>> /usr/local/jakarta-tomcat-5
>>>> # find . -name \*context\* -print
>>>> ./server/webapps/admin/context
>>>> ./server/webapps/admin/defaultcontext
>>>> ./webapps/tomcat-docs/config/printer/context.html
>>>> ./webapps/tomcat-docs/config/printer/defaultcontext.html
>>>> ./webapps/tomcat-docs/config/context.html
>>>> ./webapps/tomcat-docs/config/defaultcontext.html
>>>> ./webapps/wade2/scripts/contextmenu.css
>>>>
>>>> So I'm not sure what to do - any advice?
>>>>
>>>> Regards,
>>>>
>>>> Bob
>>>> -----Original Message-----
>>>> From: Mark Thomas [mailto:markt@apache.org] Sent: Monday, June 19,
>>>> 2006 21:13
>>>> To: Tomcat Users List
>>>> Subject: Re: pdf documents
>>>>
>>>> Bob Wyatt wrote:
>>>>
>>>>
>>>>
>>>>> I have a directory that contains hundreds of pdf files.
>>>>>
>>>>> I have Tomcat 5.0.28 running on AIX 5.2.
>>>>>
>>>>> Under the webapps/appname directory, if I create a symbolic link to
>>>>> the
>>>>>
>>>>
>>>> pdf
>>>>
>>>>
>>>>
>>>>> files, they will not display.
>>>>>
>>>>
>>>> Have you enabled linking? See the allowLinking property at
>>>> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
>>>>
>>>> Mark
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: pdf documents
Posted by Bob Wyatt <bw...@comcast.net>.
David,
Thanks for the reply...
This is over my head... is there a guide to learn to do this, or do you
perhaps have one that you would be willing to share?
I'm very, very new to this whole thing, and I know very little (next to
nothing) about the innards of all of this...
Regards,
Bob
-----Original Message-----
From: David Smith [mailto:dns4@cornell.edu]
Sent: Tuesday, June 20, 2006 09:48
To: Tomcat Users List
Subject: Re: pdf documents
I would recommend a servlet that streams the files from some configured
absolute path(s) to the client. It's reasonably simple and allows you
some degree of control over what is delivered. Map the servlet to *.pdf
in your web.xml to make it respond to all requests for pdfs.
--David
Bob Wyatt wrote:
>For the client side, sure.
>I already know it works if I copy the pdf file under my tomcat
>application... I just don't want to move hundreds of files there...
>
>Regards,
>
>Bob
>
>-----Original Message-----
>From: Martin Gainty [mailto:mgainty@hotmail.com]
>Sent: Tuesday, June 20, 2006 07:30
>To: Tomcat Users List
>Subject: Re: pdf documents
>
>Those files are in a proprietary format..you'll need to go to adobe and get
>the PDF plugin/viewer for display-
>M-
>This email message and any files transmitted with it contain confidential
>information intended only for the person(s) to whom this email message is
>addressed. If you have received this email message in error, please notify
>the sender immediately by telephone or email and destroy the original
>message without making a copy. Thank you.
>
>----- Original Message -----
>From: "Suba Suresh" <su...@wolfram.com>
>To: "Tomcat Users List" <us...@tomcat.apache.org>
>Sent: Monday, June 19, 2006 10:28 PM
>Subject: Re: pdf documents
>
>
>
>
>>I have the same problem as Bob but files mapping into different file
>>systems. I also tried the context mapping as you (Mark)had suggested with
>>app.xml file. I will read about the link config tomorrow and try it. Any
>>help would be appreciated.
>>
>>thanks,
>>suba suresh.
>>
>>Bob Wyatt wrote:
>>
>>
>>>Mark,
>>>
>>>No... Didn't know about it...
>>>Now that I know about it (Thank You), I'm not sure of what really needs
>>>to
>>>be done... No where under $CATALINA_HOME do I have a defaultcontext.xml,
>>>context.xml,
>>>or similarly named file. All of my similarly named files are *.html files
>>>
>>>
>
>
>
>>>or
>>>directories, as follows:
>>>
>>>#pwd
>>>/usr/local/jakarta-tomcat-5
>>># find . -name \*context\* -print
>>>./server/webapps/admin/context
>>>./server/webapps/admin/defaultcontext
>>>./webapps/tomcat-docs/config/printer/context.html
>>>./webapps/tomcat-docs/config/printer/defaultcontext.html
>>>./webapps/tomcat-docs/config/context.html
>>>./webapps/tomcat-docs/config/defaultcontext.html
>>>./webapps/wade2/scripts/contextmenu.css
>>>
>>>So I'm not sure what to do - any advice?
>>>
>>>Regards,
>>>
>>>Bob
>>>-----Original Message-----
>>>From: Mark Thomas [mailto:markt@apache.org] Sent: Monday, June 19, 2006
>>>21:13
>>>To: Tomcat Users List
>>>Subject: Re: pdf documents
>>>
>>>Bob Wyatt wrote:
>>>
>>>
>>>
>>>>I have a directory that contains hundreds of pdf files.
>>>>
>>>>I have Tomcat 5.0.28 running on AIX 5.2.
>>>>
>>>>Under the webapps/appname directory, if I create a symbolic link to the
>>>>
>>>>
>>>pdf
>>>
>>>
>>>
>>>>files, they will not display.
>>>>
>>>>
>>>Have you enabled linking? See the allowLinking property at
>>>http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
>>>
>>>Mark
>>>
>>>
>>>---------------------------------------------------------------------
>>>To start a new topic, e-mail: users@tomcat.apache.org
>>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To start a new topic, e-mail: users@tomcat.apache.org
>>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>---------------------------------------------------------------------
>>To start a new topic, e-mail: users@tomcat.apache.org
>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>
>---------------------------------------------------------------------
>To start a new topic, e-mail: users@tomcat.apache.org
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To start a new topic, e-mail: users@tomcat.apache.org
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: pdf documents
Posted by David Smith <dn...@cornell.edu>.
I would recommend a servlet that streams the files from some configured
absolute path(s) to the client. It's reasonably simple and allows you
some degree of control over what is delivered. Map the servlet to *.pdf
in your web.xml to make it respond to all requests for pdfs.
--David
Bob Wyatt wrote:
>For the client side, sure.
>I already know it works if I copy the pdf file under my tomcat
>application... I just don't want to move hundreds of files there...
>
>Regards,
>
>Bob
>
>-----Original Message-----
>From: Martin Gainty [mailto:mgainty@hotmail.com]
>Sent: Tuesday, June 20, 2006 07:30
>To: Tomcat Users List
>Subject: Re: pdf documents
>
>Those files are in a proprietary format..you'll need to go to adobe and get
>the PDF plugin/viewer for display-
>M-
>This email message and any files transmitted with it contain confidential
>information intended only for the person(s) to whom this email message is
>addressed. If you have received this email message in error, please notify
>the sender immediately by telephone or email and destroy the original
>message without making a copy. Thank you.
>
>----- Original Message -----
>From: "Suba Suresh" <su...@wolfram.com>
>To: "Tomcat Users List" <us...@tomcat.apache.org>
>Sent: Monday, June 19, 2006 10:28 PM
>Subject: Re: pdf documents
>
>
>
>
>>I have the same problem as Bob but files mapping into different file
>>systems. I also tried the context mapping as you (Mark)had suggested with
>>app.xml file. I will read about the link config tomorrow and try it. Any
>>help would be appreciated.
>>
>>thanks,
>>suba suresh.
>>
>>Bob Wyatt wrote:
>>
>>
>>>Mark,
>>>
>>>No... Didn't know about it...
>>>Now that I know about it (Thank You), I'm not sure of what really needs
>>>to
>>>be done... No where under $CATALINA_HOME do I have a defaultcontext.xml,
>>>context.xml,
>>>or similarly named file. All of my similarly named files are *.html files
>>>
>>>
>
>
>
>>>or
>>>directories, as follows:
>>>
>>>#pwd
>>>/usr/local/jakarta-tomcat-5
>>># find . -name \*context\* -print
>>>./server/webapps/admin/context
>>>./server/webapps/admin/defaultcontext
>>>./webapps/tomcat-docs/config/printer/context.html
>>>./webapps/tomcat-docs/config/printer/defaultcontext.html
>>>./webapps/tomcat-docs/config/context.html
>>>./webapps/tomcat-docs/config/defaultcontext.html
>>>./webapps/wade2/scripts/contextmenu.css
>>>
>>>So I'm not sure what to do - any advice?
>>>
>>>Regards,
>>>
>>>Bob
>>>-----Original Message-----
>>>From: Mark Thomas [mailto:markt@apache.org] Sent: Monday, June 19, 2006
>>>21:13
>>>To: Tomcat Users List
>>>Subject: Re: pdf documents
>>>
>>>Bob Wyatt wrote:
>>>
>>>
>>>
>>>>I have a directory that contains hundreds of pdf files.
>>>>
>>>>I have Tomcat 5.0.28 running on AIX 5.2.
>>>>
>>>>Under the webapps/appname directory, if I create a symbolic link to the
>>>>
>>>>
>>>pdf
>>>
>>>
>>>
>>>>files, they will not display.
>>>>
>>>>
>>>Have you enabled linking? See the allowLinking property at
>>>http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
>>>
>>>Mark
>>>
>>>
>>>---------------------------------------------------------------------
>>>To start a new topic, e-mail: users@tomcat.apache.org
>>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To start a new topic, e-mail: users@tomcat.apache.org
>>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>---------------------------------------------------------------------
>>To start a new topic, e-mail: users@tomcat.apache.org
>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>
>---------------------------------------------------------------------
>To start a new topic, e-mail: users@tomcat.apache.org
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To start a new topic, e-mail: users@tomcat.apache.org
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: pdf documents
Posted by Bob Wyatt <bw...@comcast.net>.
For the client side, sure.
I already know it works if I copy the pdf file under my tomcat
application... I just don't want to move hundreds of files there...
Regards,
Bob
-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Tuesday, June 20, 2006 07:30
To: Tomcat Users List
Subject: Re: pdf documents
Those files are in a proprietary format..you'll need to go to adobe and get
the PDF plugin/viewer for display-
M-
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed. If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy. Thank you.
----- Original Message -----
From: "Suba Suresh" <su...@wolfram.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Monday, June 19, 2006 10:28 PM
Subject: Re: pdf documents
>I have the same problem as Bob but files mapping into different file
>systems. I also tried the context mapping as you (Mark)had suggested with
>app.xml file. I will read about the link config tomorrow and try it. Any
>help would be appreciated.
>
> thanks,
> suba suresh.
>
> Bob Wyatt wrote:
>> Mark,
>>
>> No... Didn't know about it...
>> Now that I know about it (Thank You), I'm not sure of what really needs
>> to
>> be done... No where under $CATALINA_HOME do I have a defaultcontext.xml,
>> context.xml,
>> or similarly named file. All of my similarly named files are *.html files
>> or
>> directories, as follows:
>>
>> #pwd
>> /usr/local/jakarta-tomcat-5
>> # find . -name \*context\* -print
>> ./server/webapps/admin/context
>> ./server/webapps/admin/defaultcontext
>> ./webapps/tomcat-docs/config/printer/context.html
>> ./webapps/tomcat-docs/config/printer/defaultcontext.html
>> ./webapps/tomcat-docs/config/context.html
>> ./webapps/tomcat-docs/config/defaultcontext.html
>> ./webapps/wade2/scripts/contextmenu.css
>>
>> So I'm not sure what to do - any advice?
>>
>> Regards,
>>
>> Bob
>> -----Original Message-----
>> From: Mark Thomas [mailto:markt@apache.org] Sent: Monday, June 19, 2006
>> 21:13
>> To: Tomcat Users List
>> Subject: Re: pdf documents
>>
>> Bob Wyatt wrote:
>>
>>>I have a directory that contains hundreds of pdf files.
>>>
>>>I have Tomcat 5.0.28 running on AIX 5.2.
>>>
>>>Under the webapps/appname directory, if I create a symbolic link to the
>>
>> pdf
>>
>>>files, they will not display.
>>
>>
>> Have you enabled linking? See the allowLinking property at
>> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
>>
>> Mark
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: pdf documents
Posted by Martin Gainty <mg...@hotmail.com>.
Those files are in a proprietary format..you'll need to go to adobe and get
the PDF plugin/viewer for display-
M-
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed. If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy. Thank you.
----- Original Message -----
From: "Suba Suresh" <su...@wolfram.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Monday, June 19, 2006 10:28 PM
Subject: Re: pdf documents
>I have the same problem as Bob but files mapping into different file
>systems. I also tried the context mapping as you (Mark)had suggested with
>app.xml file. I will read about the link config tomorrow and try it. Any
>help would be appreciated.
>
> thanks,
> suba suresh.
>
> Bob Wyatt wrote:
>> Mark,
>>
>> No... Didn't know about it...
>> Now that I know about it (Thank You), I'm not sure of what really needs
>> to
>> be done... No where under $CATALINA_HOME do I have a defaultcontext.xml,
>> context.xml,
>> or similarly named file. All of my similarly named files are *.html files
>> or
>> directories, as follows:
>>
>> #pwd
>> /usr/local/jakarta-tomcat-5
>> # find . -name \*context\* -print
>> ./server/webapps/admin/context
>> ./server/webapps/admin/defaultcontext
>> ./webapps/tomcat-docs/config/printer/context.html
>> ./webapps/tomcat-docs/config/printer/defaultcontext.html
>> ./webapps/tomcat-docs/config/context.html
>> ./webapps/tomcat-docs/config/defaultcontext.html
>> ./webapps/wade2/scripts/contextmenu.css
>>
>> So I'm not sure what to do - any advice?
>>
>> Regards,
>>
>> Bob
>> -----Original Message-----
>> From: Mark Thomas [mailto:markt@apache.org] Sent: Monday, June 19, 2006
>> 21:13
>> To: Tomcat Users List
>> Subject: Re: pdf documents
>>
>> Bob Wyatt wrote:
>>
>>>I have a directory that contains hundreds of pdf files.
>>>
>>>I have Tomcat 5.0.28 running on AIX 5.2.
>>>
>>>Under the webapps/appname directory, if I create a symbolic link to the
>>
>> pdf
>>
>>>files, they will not display.
>>
>>
>> Have you enabled linking? See the allowLinking property at
>> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
>>
>> Mark
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: pdf documents
Posted by Suba Suresh <su...@wolfram.com>.
I have the same problem as Bob but files mapping into different file
systems. I also tried the context mapping as you (Mark)had suggested
with app.xml file. I will read about the link config tomorrow and try
it. Any help would be appreciated.
thanks,
suba suresh.
Bob Wyatt wrote:
> Mark,
>
> No... Didn't know about it...
> Now that I know about it (Thank You), I'm not sure of what really needs to
> be done...
>
> No where under $CATALINA_HOME do I have a defaultcontext.xml, context.xml,
> or similarly named file. All of my similarly named files are *.html files or
> directories, as follows:
>
> #pwd
> /usr/local/jakarta-tomcat-5
> # find . -name \*context\* -print
> ./server/webapps/admin/context
> ./server/webapps/admin/defaultcontext
> ./webapps/tomcat-docs/config/printer/context.html
> ./webapps/tomcat-docs/config/printer/defaultcontext.html
> ./webapps/tomcat-docs/config/context.html
> ./webapps/tomcat-docs/config/defaultcontext.html
> ./webapps/wade2/scripts/contextmenu.css
>
> So I'm not sure what to do - any advice?
>
> Regards,
>
> Bob
> -----Original Message-----
> From: Mark Thomas [mailto:markt@apache.org]
> Sent: Monday, June 19, 2006 21:13
> To: Tomcat Users List
> Subject: Re: pdf documents
>
> Bob Wyatt wrote:
>
>>I have a directory that contains hundreds of pdf files.
>>
>>I have Tomcat 5.0.28 running on AIX 5.2.
>>
>>Under the webapps/appname directory, if I create a symbolic link to the
>
> pdf
>
>>files, they will not display.
>
>
> Have you enabled linking? See the allowLinking property at
> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
>
> Mark
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: pdf documents
Posted by Suba Suresh <su...@wolfram.com>.
Is this problem of document access in different directory with 5.5.17? I
am running the same build. Someone posted last week under the topic
"Tomcat configuration error" and yesterday Daniel has posted a similar
problem under "Tomcat 5.5.17 and Ant".
suba suresh.
Mark Thomas wrote:
> Bob Wyatt wrote:
>
>>Mark,
>>
>>I appreciate all of your help and energy on my behalf...
>>
>>But alas, this does not work for me...
>
>
> Hmmm. Can you post your server.xml (with any passwords etc blanked out).
>
> Thanks,
>
> Mark
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: pdf documents
Posted by Bob Wyatt <bw...@comcast.net>.
Mark,
Pid posted a solution that works for me in the testing, but not in my app...
I am posting the server.xml to comply with your request, but I am fairly
certain that the file was not edited or altered when the app was installed.
The app is third-party...
So my questions now delve on how to make the app honor the pdf pathing
defined...
<!-- Example Server Configuration File -->
<!-- Note that component elements are nested corresponding to their
parent-child relationships with each other -->
<!-- A "Server" is a singleton element that represents the entire JVM,
which may contain one or more "Service" instances. The Server
listens for a shutdown command on the indicated port.
Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" or "Loggers" at this level.
-->
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<!-- Comment these entries out to disable JMX MBeans support -->
<!-- You may also configure custom components (e.g. Valves/Realms) by
including your own mbean-descriptor file(s), and setting the
"descriptors" attribute to point to a ';' seperated list of paths
(in the ClassLoader sense) of files to add to the default list.
e.g. descriptors="/com/myfirm/mypackage/mbean-descriptor.xml"
-->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
debug="0"/>
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
debug="0"/>
<!-- Global JNDI resources -->
<GlobalNamingResources>
<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved">
</Resource>
<ResourceParams name="UserDatabase">
<parameter>
<name>factory</name>
<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
</parameter>
<parameter>
<name>pathname</name>
<value>conf/tomcat-users.xml</value>
</parameter>
</ResourceParams>
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" (and therefore the web applications visible
within that Container). Normally, that Container is an "Engine",
but this is not required.
Note: A "Service" is not itself a "Container", so you may not
define subcomponents such as "Valves" or "Loggers" at this level.
-->
<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Catalina">
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Each Connector passes requests on to
the
associated "Container" (normally an Engine) for processing.
By default, a non-SSL HTTP/1.1 Connector is established on port
8080.
You can also enable an SSL HTTP/1.1 Connector on port 8443 by
following the instructions below and uncommenting the second
Connector
entry. SSL support requires the following steps (see the SSL
Config
HOWTO in the Tomcat 5 documentation bundle for more detailed
instructions):
* If your JDK version 1.3 or prior, download and install JSSE 1.0.2
or
later, and put the JAR files into "$JAVA_HOME/jre/lib/ext".
* Execute:
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA
(Windows)
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA
(Unix)
with a password value of "changeit" for both the certificate and
the keystore itself.
By default, DNS lookups are enabled when a web application calls
request.getRemoteHost(). This can have an adverse impact on
performance, so you can disable it by setting the
"enableLookups" attribute to "false". When DNS lookups are
disabled,
request.getRemoteHost() will return the String version of the
IP address of the remote client.
-->
<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
<Connector port="8100"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
debug="0" connectionTimeout="20000"
disableUploadTimeout="true" />
<!-- Note : To disable connection timeouts, set connectionTimeout value
to 0 -->
<!-- Note : To use gzip compression you could set the following
properties :
compression="on"
compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml"
-->
<!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
<!--
<Connector port="8443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" debug="0" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
<!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
enableLookups="false" redirectPort="8443" debug="0"
protocol="AJP/1.3" />
<!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
<!-- See proxy documentation for more information about using this. -->
<!--
<Connector port="8082"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false"
acceptCount="100" debug="0" connectionTimeout="20000"
proxyPort="80" disableUploadTimeout="true" />
-->
<!-- An Engine represents the entry point (within Catalina) that
processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes
them
on to the appropriate Host (virtual host). -->
<!-- You should set jvmRoute to support load-balancing via JK/JK2 ie :
<Engine name="Standalone" defaultHost="localhost" debug="0"
jvmRoute="jvm1">
-->
<!-- Define the top level container in our container hierarchy -->
<Engine name="Catalina" defaultHost="localhost" debug="0">
<!-- The request dumper valve dumps useful debugging information about
the request headers and cookies that were received, and the
response
headers and cookies that were sent, for all requests received by
this instance of Tomcat. If you care only about requests to a
particular virtual host, or a particular application, nest this
element inside the corresponding <Host> or <Context> entry
instead.
For a similar mechanism that is portable to all Servlet 2.4
containers, check out the "RequestDumperFilter" Filter in the
example application (the source for this filter may be found in
"$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
Request dumping is disabled by default. Uncomment the following
element to enable it. -->
<!--
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
-->
<!-- Global logger unless overridden at lower levels -->
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina_log." suffix=".txt"
timestamp="true"/>
<!-- Because this Realm is here, an instance will be shared globally
-->
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
debug="0" resourceName="UserDatabase"/>
<!-- Comment out the old realm but leave here for now in case we
need to go back quickly -->
<!--
<Realm className="org.apache.catalina.realm.MemoryRealm" />
-->
<!-- Replace the above Realm with one of the following to get a Realm
stored in a database and accessed via JDBC -->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/authority"
connectionName="test" connectionPassword="??????"
userTable="users" userNameCol="user_name"
userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="oracle.jdbc.driver.OracleDriver"
connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
connectionName="scott" connectionPassword="??????"
userTable="users" userNameCol="user_name"
userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="sun.jdbc.odbc.JdbcOdbcDriver"
connectionURL="jdbc:odbc:CATALINA"
userTable="users" userNameCol="user_name"
userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="localhost" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<!-- Defines a cluster for this node,
By defining this element, means that every manager will be
changed.
So when running a cluster, only make sure that you have webapps
in there
that need to be clustered and remove the other ones.
A cluster has the following parameters:
className = the fully qualified name of the cluster class
name = a descriptive name for your cluster, can be anything
debug = the debug level, higher means more output
mcastAddr = the multicast address, has to be the same for all
the nodes
mcastPort = the multicast port, has to be the same for all the
nodes
mcastBindAddr = bind the multicast socket to a specific address
mcastTTL = the multicast TTL if you want to limit your
broadcast
mcastSoTimeout = the multicast readtimeout
mcastFrequency = the number of milliseconds in between sending
a "I'm alive" heartbeat
mcastDropTime = the number a milliseconds before a node is
considered "dead" if no heartbeat is received
tcpThreadCount = the number of threads to handle incoming
replication requests, optimal would be the same amount of thr
eads as nodes
tcpListenAddress = the listen address (bind address) for TCP
cluster request on this host,
in case of multiple ethernet cards.
auto means that address becomes
InetAddress.getLocalHost().getHostAddress()
tcpListenPort = the tcp listen port
tcpSelectorTimeout = the timeout (ms) for the Selector.select()
method in case the OS
has a wakup bug in java.nio. Set to 0 for
no timeout
printToScreen = true means that managers will also print to
std.out
expireSessionsOnShutdown = true means that
useDirtyFlag = true means that we only replicate a session
after setAttribute,removeAttribute has been called.
false means to replicate the session after each
request.
false means that replication would work for the
following piece of code:
<%
HashMap map =
(HashMap)session.getAttribute("map");
map.put("key","value");
%>
replicationMode = can be either 'pooled', 'synchronous' or
'asynchronous'.
* Pooled means that the replication happens
using several sockets in a synchronous way. Ie, the data
gets replicated, then the request return. This is the same as the
'synchronous' setting except it uses a pool of sockets, hence it i
s multithreaded. This is the fastest and safest configuration. To use this,
also increase the nr of tcp threads that you have dealin
g with replication.
* Synchronous means that the thread that
executes the request, is also the
thread the replicates the data to the other
nodes, and will not return until all
nodes have received the information.
* Asynchronous means that there is a specific
'sender' thread for each cluster node,
so the request thread will queue the
replication request into a "smart" queue,
and then return to the client.
The "smart" queue is a queue where when a
session is added to the queue, and the same session
already exists in the queue from a previous
request, that session will be replaced
in the queue instead of replicating two
requests. This almost never happens, unless there is a
large network delay.
-->
<!--
When configuring for clustering, you also add in a valve to
catch all the requests
coming in, at the end of the request, the session may or may not
be replicated.
A session is replicated if and only if all the conditions are
met:
1. useDirtyFlag is true or setAttribute or removeAttribute has
been called AND
2. a session exists (has been created)
3. the request is not trapped by the "filter" attribute
The filter attribute is to filter out requests that could not
modify the session,
hence we don't replicate the session after the end of this
request.
The filter is negative, ie, anything you put in the filter, you
mean to filter out,
ie, no replication will be done on requests that match one of
the filters.
The filter attribute is delimited by ;, so you can't escape out
; even if you wanted to.
filter=".*\.gif;.*\.js;" means that we will not replicate the
session after requests with the URI
ending with .gif and .js are intercepted.
The deployer element can be used to deploy apps cluster wide.
Currently the deployment only deploys/undeploys to working
members in the cluster
so no WARs are copied upons startup of a broken node.
The deployer watches a directory (watchDir) for WAR files when
watchEnabled="true"
When a new war file is added the war gets deployed to the local
instance,
and then deployed to the other instances in the cluster.
When a war file is deleted from the watchDir the war is
undeployed locally
and cluster wide
-->
<!--
<Cluster
className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
managerClassName="org.apache.catalina.cluster.session.DeltaManager"
expireSessionsOnShutdown="false"
useDirtyFlag="true">
<Membership
className="org.apache.catalina.cluster.mcast.McastService"
mcastAddr="228.0.0.4"
mcastPort="45564"
mcastFrequency="500"
mcastDropTime="3000"/>
<Receiver
className="org.apache.catalina.cluster.tcp.ReplicationListener"
tcpListenAddress="auto"
tcpListenPort="4001"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>
<Sender
className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
replicationMode="pooled"/>
<Valve
className="org.apache.catalina.cluster.tcp.ReplicationValve"
filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>
<Deployer
className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
tempDir="/tmp/war-temp/"
deployDir="/tmp/war-deploy/"
watchDir="/tmp/war-listen/"
watchEnabled="false"/>
</Cluster>
-->
<!-- Normally, users must authenticate themselves to each web app
individually. Uncomment the following entry if you would like
a user to be authenticated the first time they encounter a
resource protected by a security constraint, and then have that
user identity maintained across *all* web applications
contained
in this virtual host. -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn"
debug="0"/>
-->
<!-- Access log processes all requests for this virtual host. By
default, log files are created in the "logs" directory relative
to
$CATALINA_HOME. If you wish, you can specify a different
directory with the "directory" attribute. Specify either a
relative
(to $CATALINA_HOME) or absolute path to the desired directory.
-->
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="localhost_access_log."
suffix=".txt"
pattern="common" resolveHosts="false"/>
-->
<!-- Logger shared by all Contexts related to this virtual host. By
default (when using FileLogger), log files are created in the
"logs"
directory relative to $CATALINA_HOME. If you wish, you can
specify
a different directory with the "directory" attribute. Specify
either a
relative (to $CATALINA_HOME) or absolute path to the desired
directory.-->
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="localhost_log." suffix=".txt"
timestamp="true"/>
</Host>
</Engine>
</Service>
</Server>
#
Regards,
Bob
-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org]
Sent: Tuesday, June 20, 2006 22:30
To: Tomcat Users List
Subject: Re: pdf documents
Bob Wyatt wrote:
> Mark,
>
> I appreciate all of your help and energy on my behalf...
>
> But alas, this does not work for me...
Hmmm. Can you post your server.xml (with any passwords etc blanked out).
Thanks,
Mark
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: pdf documents
Posted by Mark Thomas <ma...@apache.org>.
Bob Wyatt wrote:
> Mark,
>
> I appreciate all of your help and energy on my behalf...
>
> But alas, this does not work for me...
Hmmm. Can you post your server.xml (with any passwords etc blanked out).
Thanks,
Mark
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: pdf documents
Posted by Bob Wyatt <bw...@comcast.net>.
Pid,
Thanks for everything!
Regards,
Bob
-----Original Message-----
From: Pid [mailto:p@pidster.com]
Sent: Thursday, June 22, 2006 10:31
To: Tomcat Users List
Subject: Re: pdf documents
Bob Wyatt wrote:
> Pid,
>
> Your question sent me hunting, and we were specifying no path at all, so
it
> was a relative reference. I have changed it to an absolute reference, and
it
> is now working.
Great.
> Can I have multiple docBase assignments in the pdf.xml file for multiple
pdf
> file sources (assuming I use different paths and a different absolute path
> name)?
No you can't. Each Context only has one path, and one docBase attribute.
You'd need to decide on what path you wish to assign in the web
application. I'd recommend having another read of the Tomcat docs about
Contexts, you're on your way to getting it all sorted.
Don't forget, the path in the webapp is based on the filename of the
context .xml file. so /pdf/ is a result of pdf.xml.
/pdf2006/ is a result of pdf2006.xml, (which contains a docBase with a
filesystem url, and a matching path attribute.).
> Thank you Pid, Mark, Martin, Suba, Martin, and David; your willingness to
> help, and the help rendered is greatly appreciated!
>
> Regards,
>
> Bob
>
> -----Original Message-----
> From: Pid [mailto:p@pidster.com]
> Sent: Wednesday, June 21, 2006 11:59
> To: Tomcat Users List
> Subject: Re: pdf documents
>
>
> Bob Wyatt wrote:
>> Pid,
>>
>> HREF="C666119.pdf"
>
> OK. The above is a relative path. The client browser (not the webapp) is
> looking in the wrong place, because you aren't telling it the correct
path.
> You really need to try to get your head round the difference between
> relative and absolute paths and then, also, file system paths and web
URLs.
>
> The PDFs are currently available under the web URL:
> http://myipaddr:8100/pdf/C666119.pdf
>
> which means that the link should refer to href="/pdf/C666119.pdf"
> This would be an absolute path.
>
> You can't map the file system path (/big/dir/of/pdfs/) to the same web
> URL as the app, because the two can't co-exist in the same place.
>
>> As no file path is in HREF, and pdf.xml is correct (as exhibited by
>> http://myipaddr:8100/pdf), should I be changing the path from /pdf to
>> /myapp/jsp/app, or are you advocating changing the app so the HREF
becomes
>> /usr/lg/unformq/C666119.pdf? This latter one, I have no idea of where or
> how
>> to do it, but that does not mean it cannot be done.
>
> /usr/lg/unformq/C666119.pdf is a file system path, and therefore not
> accessible to the browser/client. Once again, the webapp is not looking
> for, searching for, or accessing the PDF files, it's the
> browser/client/user who is.
>
> Who authored the file/page that contains the list of PDFs? The author of
> the commercial app, or someone in your organisation?
>
>
>> Thanks for all of your help!
>>
>> Regards,
>>
>> Bob
>>
>>
>> -----Original Message-----
>> From: Pid [mailto:p@pidster.com]
>> Sent: Wednesday, June 21, 2006 11:11
>> To: Tomcat Users List
>> Subject: Re: pdf documents
>>
>> Bob Wyatt wrote:
>>> Pid,
>>>
>>> I mean that it appears as though the webapp is looking in its own path
> for
>>> the pdf, and not the path of pdf files defined for Tomcat...
>> Yes, see below.
>>
>>> The webapp true path would be:
>>> $CATALINA_HOME/webapps/myapp/jsp/app/C666119.pdf...
>> OK, that's a filing system path.
>>
>>> We connect to it by http://myipaddr:8100/myapp
>>>
>>> The app 'myapp' is a third-party application we purchased...
>>>
>>> In this case, we have some myapp applications that pull up a fax log of
>> all
>>> fax transmissions for a user for the past 60 days. We are providing a
> link
>>> in that 'listing' to click to view the fax that was transmitted, which
> has
>>> been saved as a pdf file. As we have 150 users, there are hundreds of
>> these
>>> pdf files out there, and I do not want them under $CATALINA_HOME. It
> would
>>> appear that we cannot control (specify) the path in which it searches
for
>>> the pdf files, although Tomcat can when given the proper url
>>> (http://myipaddr:8100/pdf).
>> (If I'm understanding this correctly it's not searching for anything.)
>>
>> The user is clicking the PDF link, and getting a 404, yes?
>> If so, do a 'view source' on the HTML page, and tell me what's in the
>> href attribute of the link.
>>
>> Is it href="C666119.pdf" or is it href="/myapp/some/path/C666119.pdf" or
>> something else?
>>
>>> Can an app supersede the pdf search path, or ignore it entirely? Can
this
>>> 'feature' be disabled?
>> There's no feature I'm afraid. The myapp isn't aware of the PDF context
>> you've installed to map the filing system to a URL, so it's ignoring it.
>>
>> Either you must configure the app to write the correct URL for each
>> PDF*, or you must map the PDF context to the place that is generated by
>> the app**.
>>
>> * By altering the HTML to point to the path you defined in pdf.xml.
>> ** By altering context pdf.xml definition to create the correct path.
>>
>>> Regards,
>>>
>>> Bob
>> P.S. Just reply to the list mate, I'm getting 2 copies...
>>
>>
>>
>>
>>
>>> -----Original Message-----
>>> From: Pid [mailto:p@pidster.com]
>>> Sent: Wednesday, June 21, 2006 09:53
>>> To: Tomcat Users List
>>> Subject: Re: pdf documents
>>>
>>> np
>>>
>>> I don't understand why you're or your webapp is looking here:
>>> /myapp/jsp/app/C666119.pdf
>>>
>>> when the files are available here:
>>> /pdf/C666119.pdf
>>>
>>> Is the first a filesystem path, or a web URL?
>>> When you say "my webapp does not pull it from here", what do you mean by
>>> that? Sorry if I came to this late, but what does your webapp do and
>>> why is it looking there, and not at /pdf/C666119.pdf?
>>>
>>> Is it just a link that you're clicking or does your webapp download/open
>>> the PDF file?
>>>
>>>
>>>
>>>
>>>
>>> Bob Wyatt wrote:
>>>> Pid,
>>>>
>>>> Thank you very much for this response...
>>>>
>>>> Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does
>>> now
>>>> allow http://myipaddr:8100/pdf to display the files in the specified
>>>> directory.
>>>>
>>>> However, my webapp still does not pull it from here; it reports that
the
>>>> resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing
>> there
>>>> is a file within the webapp that is over-riding, or over-ruling the
>>>> 'default' that is now created?
>>>>
>>>> Can someone provide any advice on where to look next?
>>>>
>>>> Can someone provide some advice on what to do if I want to use more
than
>>> one
>>>> pdf directory, where the second directory is not a subdirectory of the
>>>> first?
>>>>
>>>> Regards,
>>>>
>>>> Bob
>>>>
>>>> -----Original Message-----
>>>> From: Pid [mailto:p@pidster.com]
>>>> Sent: Wednesday, June 21, 2006 05:04
>>>> To: Tomcat Users List
>>>> Subject: Re: pdf documents
>>>>
>>>> Don't you need to put the context file pdf.xml in a different place?
>>>>
>>>>
>
$CATALINA_HOME/conf/<engine-prob-Catalina?>/<hostname-maybe-webapp?>/pdf.xml
>>>> Once it's there you have to call the correct URL, which will be
>>>> <webapp-path>/pdf/<file>.pdf
>>>>
>>>>
>>>>
>>>>
>>>> Bob Wyatt wrote:
>>>>> Mark,
>>>>>
>>>>> I appreciate all of your help and energy on my behalf...
>>>>>
>>>>> But alas, this does not work for me...
>>>>>
>>>>> "The requested resource (/myapp/jsp/app/C666119.pdf) is not
>> available..."
>>>>> I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I
>>> modified
>>>>> $CATALINA_HOME/webapps/pdf.xml to read:
>>>>> # more pdf.xml
>>>>> <Context docBase="/usr/lg/unformq" path="/pdf" > </Context>
>>>>>
>>>>> The test to http://myip:8100/pdf also fails with resource
> unavailable...
>>>>> The log file does not report any errors; the last entries are from the
>>>>> shutdown and restart of tomcat...
>>>>>
>>>>> 2006-06-20 19:24:58
StandardContext[/servlets-examples]ContextListener:
>>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>>>> va.lang.String;@38a11b3b')
>>>>> 2006-06-20 19:24:58
StandardContext[/servlets-examples]ContextListener:
>>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>>>> va.lang.String;@66cb5b3c')
>>>>> 2006-06-20 19:24:58
StandardContext[/servlets-examples]ContextListener:
>>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>>>> va.lang.String;@1495b3c')
>>>>> 2006-06-20 19:24:58
StandardContext[/servlets-examples]SessionListener:
>>>>> contextDestroyed()
>>>>> 2006-06-20 19:24:58
StandardContext[/servlets-examples]ContextListener:
>>>>> contextDestroyed()
>>>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>>>> ng.String;@195f9b3d')
>>>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>>>> ng.String;@4745b3d')
>>>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>>>> ng.String;@345db3d')
>>>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]SessionListener:
>>>>> contextDestroyed()
>>>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>>>> contextDestroyed()
>>>>> 2006-06-20 19:25:39
>>>>> StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter:
>>>> init():
>>>>> ruleChain: [org.apache.webapp.balan
>>>>> cer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule:
>>>> Target
>>>>> string: News / Redirect URL: http://www.cnn.com], [org.a
>>>>> pache.webapp.balancer.rules.RequestParameterRule: Target param name:
>>>>> paramName / Target param value: paramValue / Redirect URL: http
>>>>> ://www.yahoo.com],
>>> [org.apache.webapp.balancer.rules.AcceptEverythingRule:
>>>>> Redirect URL: http://jakarta.apache.org]]
>>>>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]ContextListener:
>>>>> contextInitialized()
>>>>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]SessionListener:
>>>>> contextInitialized()
>>>>> 2006-06-20 19:25:39
StandardContext[/servlets-examples]ContextListener:
>>>>> contextInitialized()
>>>>> 2006-06-20 19:25:39
StandardContext[/servlets-examples]SessionListener:
>>>>> contextInitialized()
>>>>>
>>>>> Regards,
>>>>>
>>>>> Bob
>>>>>
>>>>> -----Original Message-----
>>>>> From: Mark Thomas [mailto:markt@apache.org]
>>>>> Sent: Tuesday, June 20, 2006 19:14
>>>>> To: Tomcat Users List
>>>>> Subject: Re: pdf documents
>>>>>
>>>>> Bob Wyatt wrote:
>>>>>> <Context docBase="/usr/test/pdf" > </Context>
>>>>> Sorry, I should have read you post more carefully. The above works for
>>>>> 5.5.x but for 5.0.x you will need
>>>>> <Context docBase="/usr/test/pdf" path="/pdf" > </Context>
>>>>>
>>>>> On this version directory listings are enabled so http://host:port/pdf
>>>>> should return a directory listing.
>>>>>
>>>>>> So I then copied pdf.xml to $CATALINA_HOME/webapps/appname/WEB-INF,
>>>>> shutdown
>>>>>> and restarted Tomcat, and I receive the same error message.
>>>>> I don't think this would ever work. I'd delete this copy of pdf.xml so
>>>>> it doesn't cause confusion down the road.
>>>>>
>>>>> If, after a restart, this still doesn't work have a look in
>>>>> $CATALINA_HOME/logs and post the relevant sections of the logs.
>>>>>
>>>>> Mark
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: pdf documents
Posted by Pid <p...@pidster.com>.
Bob Wyatt wrote:
> Pid,
>
> Your question sent me hunting, and we were specifying no path at all, so it
> was a relative reference. I have changed it to an absolute reference, and it
> is now working.
Great.
> Can I have multiple docBase assignments in the pdf.xml file for multiple pdf
> file sources (assuming I use different paths and a different absolute path
> name)?
No you can't. Each Context only has one path, and one docBase attribute.
You'd need to decide on what path you wish to assign in the web
application. I'd recommend having another read of the Tomcat docs about
Contexts, you're on your way to getting it all sorted.
Don't forget, the path in the webapp is based on the filename of the
context .xml file. so /pdf/ is a result of pdf.xml.
/pdf2006/ is a result of pdf2006.xml, (which contains a docBase with a
filesystem url, and a matching path attribute.).
> Thank you Pid, Mark, Martin, Suba, Martin, and David; your willingness to
> help, and the help rendered is greatly appreciated!
>
> Regards,
>
> Bob
>
> -----Original Message-----
> From: Pid [mailto:p@pidster.com]
> Sent: Wednesday, June 21, 2006 11:59
> To: Tomcat Users List
> Subject: Re: pdf documents
>
>
> Bob Wyatt wrote:
>> Pid,
>>
>> HREF="C666119.pdf"
>
> OK. The above is a relative path. The client browser (not the webapp) is
> looking in the wrong place, because you aren't telling it the correct path.
> You really need to try to get your head round the difference between
> relative and absolute paths and then, also, file system paths and web URLs.
>
> The PDFs are currently available under the web URL:
> http://myipaddr:8100/pdf/C666119.pdf
>
> which means that the link should refer to href="/pdf/C666119.pdf"
> This would be an absolute path.
>
> You can't map the file system path (/big/dir/of/pdfs/) to the same web
> URL as the app, because the two can't co-exist in the same place.
>
>> As no file path is in HREF, and pdf.xml is correct (as exhibited by
>> http://myipaddr:8100/pdf), should I be changing the path from /pdf to
>> /myapp/jsp/app, or are you advocating changing the app so the HREF becomes
>> /usr/lg/unformq/C666119.pdf? This latter one, I have no idea of where or
> how
>> to do it, but that does not mean it cannot be done.
>
> /usr/lg/unformq/C666119.pdf is a file system path, and therefore not
> accessible to the browser/client. Once again, the webapp is not looking
> for, searching for, or accessing the PDF files, it's the
> browser/client/user who is.
>
> Who authored the file/page that contains the list of PDFs? The author of
> the commercial app, or someone in your organisation?
>
>
>> Thanks for all of your help!
>>
>> Regards,
>>
>> Bob
>>
>>
>> -----Original Message-----
>> From: Pid [mailto:p@pidster.com]
>> Sent: Wednesday, June 21, 2006 11:11
>> To: Tomcat Users List
>> Subject: Re: pdf documents
>>
>> Bob Wyatt wrote:
>>> Pid,
>>>
>>> I mean that it appears as though the webapp is looking in its own path
> for
>>> the pdf, and not the path of pdf files defined for Tomcat...
>> Yes, see below.
>>
>>> The webapp true path would be:
>>> $CATALINA_HOME/webapps/myapp/jsp/app/C666119.pdf...
>> OK, that's a filing system path.
>>
>>> We connect to it by http://myipaddr:8100/myapp
>>>
>>> The app 'myapp' is a third-party application we purchased...
>>>
>>> In this case, we have some myapp applications that pull up a fax log of
>> all
>>> fax transmissions for a user for the past 60 days. We are providing a
> link
>>> in that 'listing' to click to view the fax that was transmitted, which
> has
>>> been saved as a pdf file. As we have 150 users, there are hundreds of
>> these
>>> pdf files out there, and I do not want them under $CATALINA_HOME. It
> would
>>> appear that we cannot control (specify) the path in which it searches for
>>> the pdf files, although Tomcat can when given the proper url
>>> (http://myipaddr:8100/pdf).
>> (If I'm understanding this correctly it's not searching for anything.)
>>
>> The user is clicking the PDF link, and getting a 404, yes?
>> If so, do a 'view source' on the HTML page, and tell me what's in the
>> href attribute of the link.
>>
>> Is it href="C666119.pdf" or is it href="/myapp/some/path/C666119.pdf" or
>> something else?
>>
>>> Can an app supersede the pdf search path, or ignore it entirely? Can this
>>> 'feature' be disabled?
>> There's no feature I'm afraid. The myapp isn't aware of the PDF context
>> you've installed to map the filing system to a URL, so it's ignoring it.
>>
>> Either you must configure the app to write the correct URL for each
>> PDF*, or you must map the PDF context to the place that is generated by
>> the app**.
>>
>> * By altering the HTML to point to the path you defined in pdf.xml.
>> ** By altering context pdf.xml definition to create the correct path.
>>
>>> Regards,
>>>
>>> Bob
>> P.S. Just reply to the list mate, I'm getting 2 copies...
>>
>>
>>
>>
>>
>>> -----Original Message-----
>>> From: Pid [mailto:p@pidster.com]
>>> Sent: Wednesday, June 21, 2006 09:53
>>> To: Tomcat Users List
>>> Subject: Re: pdf documents
>>>
>>> np
>>>
>>> I don't understand why you're or your webapp is looking here:
>>> /myapp/jsp/app/C666119.pdf
>>>
>>> when the files are available here:
>>> /pdf/C666119.pdf
>>>
>>> Is the first a filesystem path, or a web URL?
>>> When you say "my webapp does not pull it from here", what do you mean by
>>> that? Sorry if I came to this late, but what does your webapp do and
>>> why is it looking there, and not at /pdf/C666119.pdf?
>>>
>>> Is it just a link that you're clicking or does your webapp download/open
>>> the PDF file?
>>>
>>>
>>>
>>>
>>>
>>> Bob Wyatt wrote:
>>>> Pid,
>>>>
>>>> Thank you very much for this response...
>>>>
>>>> Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does
>>> now
>>>> allow http://myipaddr:8100/pdf to display the files in the specified
>>>> directory.
>>>>
>>>> However, my webapp still does not pull it from here; it reports that the
>>>> resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing
>> there
>>>> is a file within the webapp that is over-riding, or over-ruling the
>>>> 'default' that is now created?
>>>>
>>>> Can someone provide any advice on where to look next?
>>>>
>>>> Can someone provide some advice on what to do if I want to use more than
>>> one
>>>> pdf directory, where the second directory is not a subdirectory of the
>>>> first?
>>>>
>>>> Regards,
>>>>
>>>> Bob
>>>>
>>>> -----Original Message-----
>>>> From: Pid [mailto:p@pidster.com]
>>>> Sent: Wednesday, June 21, 2006 05:04
>>>> To: Tomcat Users List
>>>> Subject: Re: pdf documents
>>>>
>>>> Don't you need to put the context file pdf.xml in a different place?
>>>>
>>>>
> $CATALINA_HOME/conf/<engine-prob-Catalina?>/<hostname-maybe-webapp?>/pdf.xml
>>>> Once it's there you have to call the correct URL, which will be
>>>> <webapp-path>/pdf/<file>.pdf
>>>>
>>>>
>>>>
>>>>
>>>> Bob Wyatt wrote:
>>>>> Mark,
>>>>>
>>>>> I appreciate all of your help and energy on my behalf...
>>>>>
>>>>> But alas, this does not work for me...
>>>>>
>>>>> "The requested resource (/myapp/jsp/app/C666119.pdf) is not
>> available..."
>>>>> I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I
>>> modified
>>>>> $CATALINA_HOME/webapps/pdf.xml to read:
>>>>> # more pdf.xml
>>>>> <Context docBase="/usr/lg/unformq" path="/pdf" > </Context>
>>>>>
>>>>> The test to http://myip:8100/pdf also fails with resource
> unavailable...
>>>>> The log file does not report any errors; the last entries are from the
>>>>> shutdown and restart of tomcat...
>>>>>
>>>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>>>> va.lang.String;@38a11b3b')
>>>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>>>> va.lang.String;@66cb5b3c')
>>>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>>>> va.lang.String;@1495b3c')
>>>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]SessionListener:
>>>>> contextDestroyed()
>>>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>>>> contextDestroyed()
>>>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>>>> ng.String;@195f9b3d')
>>>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>>>> ng.String;@4745b3d')
>>>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>>>> ng.String;@345db3d')
>>>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]SessionListener:
>>>>> contextDestroyed()
>>>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>>>> contextDestroyed()
>>>>> 2006-06-20 19:25:39
>>>>> StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter:
>>>> init():
>>>>> ruleChain: [org.apache.webapp.balan
>>>>> cer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule:
>>>> Target
>>>>> string: News / Redirect URL: http://www.cnn.com], [org.a
>>>>> pache.webapp.balancer.rules.RequestParameterRule: Target param name:
>>>>> paramName / Target param value: paramValue / Redirect URL: http
>>>>> ://www.yahoo.com],
>>> [org.apache.webapp.balancer.rules.AcceptEverythingRule:
>>>>> Redirect URL: http://jakarta.apache.org]]
>>>>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]ContextListener:
>>>>> contextInitialized()
>>>>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]SessionListener:
>>>>> contextInitialized()
>>>>> 2006-06-20 19:25:39 StandardContext[/servlets-examples]ContextListener:
>>>>> contextInitialized()
>>>>> 2006-06-20 19:25:39 StandardContext[/servlets-examples]SessionListener:
>>>>> contextInitialized()
>>>>>
>>>>> Regards,
>>>>>
>>>>> Bob
>>>>>
>>>>> -----Original Message-----
>>>>> From: Mark Thomas [mailto:markt@apache.org]
>>>>> Sent: Tuesday, June 20, 2006 19:14
>>>>> To: Tomcat Users List
>>>>> Subject: Re: pdf documents
>>>>>
>>>>> Bob Wyatt wrote:
>>>>>> <Context docBase="/usr/test/pdf" > </Context>
>>>>> Sorry, I should have read you post more carefully. The above works for
>>>>> 5.5.x but for 5.0.x you will need
>>>>> <Context docBase="/usr/test/pdf" path="/pdf" > </Context>
>>>>>
>>>>> On this version directory listings are enabled so http://host:port/pdf
>>>>> should return a directory listing.
>>>>>
>>>>>> So I then copied pdf.xml to $CATALINA_HOME/webapps/appname/WEB-INF,
>>>>> shutdown
>>>>>> and restarted Tomcat, and I receive the same error message.
>>>>> I don't think this would ever work. I'd delete this copy of pdf.xml so
>>>>> it doesn't cause confusion down the road.
>>>>>
>>>>> If, after a restart, this still doesn't work have a look in
>>>>> $CATALINA_HOME/logs and post the relevant sections of the logs.
>>>>>
>>>>> Mark
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: pdf documents
Posted by Bob Wyatt <bw...@comcast.net>.
Pid,
Your question sent me hunting, and we were specifying no path at all, so it
was a relative reference. I have changed it to an absolute reference, and it
is now working.
Can I have multiple docBase assignments in the pdf.xml file for multiple pdf
file sources (assuming I use different paths and a different absolute path
name)?
Thank you Pid, Mark, Martin, Suba, Martin, and David; your willingness to
help, and the help rendered is greatly appreciated!
Regards,
Bob
-----Original Message-----
From: Pid [mailto:p@pidster.com]
Sent: Wednesday, June 21, 2006 11:59
To: Tomcat Users List
Subject: Re: pdf documents
Bob Wyatt wrote:
> Pid,
>
> HREF="C666119.pdf"
OK. The above is a relative path. The client browser (not the webapp) is
looking in the wrong place, because you aren't telling it the correct path.
You really need to try to get your head round the difference between
relative and absolute paths and then, also, file system paths and web URLs.
The PDFs are currently available under the web URL:
http://myipaddr:8100/pdf/C666119.pdf
which means that the link should refer to href="/pdf/C666119.pdf"
This would be an absolute path.
You can't map the file system path (/big/dir/of/pdfs/) to the same web
URL as the app, because the two can't co-exist in the same place.
> As no file path is in HREF, and pdf.xml is correct (as exhibited by
> http://myipaddr:8100/pdf), should I be changing the path from /pdf to
> /myapp/jsp/app, or are you advocating changing the app so the HREF becomes
> /usr/lg/unformq/C666119.pdf? This latter one, I have no idea of where or
how
> to do it, but that does not mean it cannot be done.
/usr/lg/unformq/C666119.pdf is a file system path, and therefore not
accessible to the browser/client. Once again, the webapp is not looking
for, searching for, or accessing the PDF files, it's the
browser/client/user who is.
Who authored the file/page that contains the list of PDFs? The author of
the commercial app, or someone in your organisation?
> Thanks for all of your help!
>
> Regards,
>
> Bob
>
>
> -----Original Message-----
> From: Pid [mailto:p@pidster.com]
> Sent: Wednesday, June 21, 2006 11:11
> To: Tomcat Users List
> Subject: Re: pdf documents
>
> Bob Wyatt wrote:
>> Pid,
>>
>> I mean that it appears as though the webapp is looking in its own path
for
>> the pdf, and not the path of pdf files defined for Tomcat...
>
> Yes, see below.
>
>> The webapp true path would be:
>> $CATALINA_HOME/webapps/myapp/jsp/app/C666119.pdf...
>
> OK, that's a filing system path.
>
>> We connect to it by http://myipaddr:8100/myapp
>>
>> The app 'myapp' is a third-party application we purchased...
>>
>> In this case, we have some myapp applications that pull up a fax log of
> all
>> fax transmissions for a user for the past 60 days. We are providing a
link
>> in that 'listing' to click to view the fax that was transmitted, which
has
>> been saved as a pdf file. As we have 150 users, there are hundreds of
> these
>> pdf files out there, and I do not want them under $CATALINA_HOME. It
would
>> appear that we cannot control (specify) the path in which it searches for
>> the pdf files, although Tomcat can when given the proper url
>> (http://myipaddr:8100/pdf).
>
> (If I'm understanding this correctly it's not searching for anything.)
>
> The user is clicking the PDF link, and getting a 404, yes?
> If so, do a 'view source' on the HTML page, and tell me what's in the
> href attribute of the link.
>
> Is it href="C666119.pdf" or is it href="/myapp/some/path/C666119.pdf" or
> something else?
>
>> Can an app supersede the pdf search path, or ignore it entirely? Can this
>> 'feature' be disabled?
>
> There's no feature I'm afraid. The myapp isn't aware of the PDF context
> you've installed to map the filing system to a URL, so it's ignoring it.
>
> Either you must configure the app to write the correct URL for each
> PDF*, or you must map the PDF context to the place that is generated by
> the app**.
>
> * By altering the HTML to point to the path you defined in pdf.xml.
> ** By altering context pdf.xml definition to create the correct path.
>
>> Regards,
>>
>> Bob
>
> P.S. Just reply to the list mate, I'm getting 2 copies...
>
>
>
>
>
>> -----Original Message-----
>> From: Pid [mailto:p@pidster.com]
>> Sent: Wednesday, June 21, 2006 09:53
>> To: Tomcat Users List
>> Subject: Re: pdf documents
>>
>> np
>>
>> I don't understand why you're or your webapp is looking here:
>> /myapp/jsp/app/C666119.pdf
>>
>> when the files are available here:
>> /pdf/C666119.pdf
>>
>> Is the first a filesystem path, or a web URL?
>> When you say "my webapp does not pull it from here", what do you mean by
>> that? Sorry if I came to this late, but what does your webapp do and
>> why is it looking there, and not at /pdf/C666119.pdf?
>>
>> Is it just a link that you're clicking or does your webapp download/open
>> the PDF file?
>>
>>
>>
>>
>>
>> Bob Wyatt wrote:
>>> Pid,
>>>
>>> Thank you very much for this response...
>>>
>>> Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does
>> now
>>> allow http://myipaddr:8100/pdf to display the files in the specified
>>> directory.
>>>
>>> However, my webapp still does not pull it from here; it reports that the
>>> resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing
> there
>>> is a file within the webapp that is over-riding, or over-ruling the
>>> 'default' that is now created?
>>>
>>> Can someone provide any advice on where to look next?
>>>
>>> Can someone provide some advice on what to do if I want to use more than
>> one
>>> pdf directory, where the second directory is not a subdirectory of the
>>> first?
>>>
>>> Regards,
>>>
>>> Bob
>>>
>>> -----Original Message-----
>>> From: Pid [mailto:p@pidster.com]
>>> Sent: Wednesday, June 21, 2006 05:04
>>> To: Tomcat Users List
>>> Subject: Re: pdf documents
>>>
>>> Don't you need to put the context file pdf.xml in a different place?
>>>
>>>
>
$CATALINA_HOME/conf/<engine-prob-Catalina?>/<hostname-maybe-webapp?>/pdf.xml
>>> Once it's there you have to call the correct URL, which will be
>>> <webapp-path>/pdf/<file>.pdf
>>>
>>>
>>>
>>>
>>> Bob Wyatt wrote:
>>>> Mark,
>>>>
>>>> I appreciate all of your help and energy on my behalf...
>>>>
>>>> But alas, this does not work for me...
>>>>
>>>> "The requested resource (/myapp/jsp/app/C666119.pdf) is not
> available..."
>>>> I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I
>> modified
>>>> $CATALINA_HOME/webapps/pdf.xml to read:
>>>> # more pdf.xml
>>>> <Context docBase="/usr/lg/unformq" path="/pdf" > </Context>
>>>>
>>>> The test to http://myip:8100/pdf also fails with resource
unavailable...
>>>>
>>>> The log file does not report any errors; the last entries are from the
>>>> shutdown and restart of tomcat...
>>>>
>>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>>> va.lang.String;@38a11b3b')
>>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>>> va.lang.String;@66cb5b3c')
>>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>>> va.lang.String;@1495b3c')
>>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]SessionListener:
>>>> contextDestroyed()
>>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>>> contextDestroyed()
>>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>>> ng.String;@195f9b3d')
>>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>>> ng.String;@4745b3d')
>>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>>> ng.String;@345db3d')
>>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]SessionListener:
>>>> contextDestroyed()
>>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>>> contextDestroyed()
>>>> 2006-06-20 19:25:39
>>>> StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter:
>>> init():
>>>> ruleChain: [org.apache.webapp.balan
>>>> cer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule:
>>> Target
>>>> string: News / Redirect URL: http://www.cnn.com], [org.a
>>>> pache.webapp.balancer.rules.RequestParameterRule: Target param name:
>>>> paramName / Target param value: paramValue / Redirect URL: http
>>>> ://www.yahoo.com],
>> [org.apache.webapp.balancer.rules.AcceptEverythingRule:
>>>> Redirect URL: http://jakarta.apache.org]]
>>>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]ContextListener:
>>>> contextInitialized()
>>>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]SessionListener:
>>>> contextInitialized()
>>>> 2006-06-20 19:25:39 StandardContext[/servlets-examples]ContextListener:
>>>> contextInitialized()
>>>> 2006-06-20 19:25:39 StandardContext[/servlets-examples]SessionListener:
>>>> contextInitialized()
>>>>
>>>> Regards,
>>>>
>>>> Bob
>>>>
>>>> -----Original Message-----
>>>> From: Mark Thomas [mailto:markt@apache.org]
>>>> Sent: Tuesday, June 20, 2006 19:14
>>>> To: Tomcat Users List
>>>> Subject: Re: pdf documents
>>>>
>>>> Bob Wyatt wrote:
>>>>> <Context docBase="/usr/test/pdf" > </Context>
>>>> Sorry, I should have read you post more carefully. The above works for
>>>> 5.5.x but for 5.0.x you will need
>>>> <Context docBase="/usr/test/pdf" path="/pdf" > </Context>
>>>>
>>>> On this version directory listings are enabled so http://host:port/pdf
>>>> should return a directory listing.
>>>>
>>>>> So I then copied pdf.xml to $CATALINA_HOME/webapps/appname/WEB-INF,
>>>> shutdown
>>>>> and restarted Tomcat, and I receive the same error message.
>>>> I don't think this would ever work. I'd delete this copy of pdf.xml so
>>>> it doesn't cause confusion down the road.
>>>>
>>>> If, after a restart, this still doesn't work have a look in
>>>> $CATALINA_HOME/logs and post the relevant sections of the logs.
>>>>
>>>> Mark
>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: pdf documents
Posted by Pid <p...@pidster.com>.
Bob Wyatt wrote:
> Pid,
>
> HREF="C666119.pdf"
OK. The above is a relative path. The client browser (not the webapp) is
looking in the wrong place, because you aren't telling it the correct path.
You really need to try to get your head round the difference between
relative and absolute paths and then, also, file system paths and web URLs.
The PDFs are currently available under the web URL:
http://myipaddr:8100/pdf/C666119.pdf
which means that the link should refer to href="/pdf/C666119.pdf"
This would be an absolute path.
You can't map the file system path (/big/dir/of/pdfs/) to the same web
URL as the app, because the two can't co-exist in the same place.
> As no file path is in HREF, and pdf.xml is correct (as exhibited by
> http://myipaddr:8100/pdf), should I be changing the path from /pdf to
> /myapp/jsp/app, or are you advocating changing the app so the HREF becomes
> /usr/lg/unformq/C666119.pdf? This latter one, I have no idea of where or how
> to do it, but that does not mean it cannot be done.
/usr/lg/unformq/C666119.pdf is a file system path, and therefore not
accessible to the browser/client. Once again, the webapp is not looking
for, searching for, or accessing the PDF files, it's the
browser/client/user who is.
Who authored the file/page that contains the list of PDFs? The author of
the commercial app, or someone in your organisation?
> Thanks for all of your help!
>
> Regards,
>
> Bob
>
>
> -----Original Message-----
> From: Pid [mailto:p@pidster.com]
> Sent: Wednesday, June 21, 2006 11:11
> To: Tomcat Users List
> Subject: Re: pdf documents
>
> Bob Wyatt wrote:
>> Pid,
>>
>> I mean that it appears as though the webapp is looking in its own path for
>> the pdf, and not the path of pdf files defined for Tomcat...
>
> Yes, see below.
>
>> The webapp true path would be:
>> $CATALINA_HOME/webapps/myapp/jsp/app/C666119.pdf...
>
> OK, that's a filing system path.
>
>> We connect to it by http://myipaddr:8100/myapp
>>
>> The app 'myapp' is a third-party application we purchased...
>>
>> In this case, we have some myapp applications that pull up a fax log of
> all
>> fax transmissions for a user for the past 60 days. We are providing a link
>> in that 'listing' to click to view the fax that was transmitted, which has
>> been saved as a pdf file. As we have 150 users, there are hundreds of
> these
>> pdf files out there, and I do not want them under $CATALINA_HOME. It would
>> appear that we cannot control (specify) the path in which it searches for
>> the pdf files, although Tomcat can when given the proper url
>> (http://myipaddr:8100/pdf).
>
> (If I'm understanding this correctly it's not searching for anything.)
>
> The user is clicking the PDF link, and getting a 404, yes?
> If so, do a 'view source' on the HTML page, and tell me what's in the
> href attribute of the link.
>
> Is it href="C666119.pdf" or is it href="/myapp/some/path/C666119.pdf" or
> something else?
>
>> Can an app supersede the pdf search path, or ignore it entirely? Can this
>> 'feature' be disabled?
>
> There's no feature I'm afraid. The myapp isn't aware of the PDF context
> you've installed to map the filing system to a URL, so it's ignoring it.
>
> Either you must configure the app to write the correct URL for each
> PDF*, or you must map the PDF context to the place that is generated by
> the app**.
>
> * By altering the HTML to point to the path you defined in pdf.xml.
> ** By altering context pdf.xml definition to create the correct path.
>
>> Regards,
>>
>> Bob
>
> P.S. Just reply to the list mate, I'm getting 2 copies...
>
>
>
>
>
>> -----Original Message-----
>> From: Pid [mailto:p@pidster.com]
>> Sent: Wednesday, June 21, 2006 09:53
>> To: Tomcat Users List
>> Subject: Re: pdf documents
>>
>> np
>>
>> I don't understand why you're or your webapp is looking here:
>> /myapp/jsp/app/C666119.pdf
>>
>> when the files are available here:
>> /pdf/C666119.pdf
>>
>> Is the first a filesystem path, or a web URL?
>> When you say "my webapp does not pull it from here", what do you mean by
>> that? Sorry if I came to this late, but what does your webapp do and
>> why is it looking there, and not at /pdf/C666119.pdf?
>>
>> Is it just a link that you're clicking or does your webapp download/open
>> the PDF file?
>>
>>
>>
>>
>>
>> Bob Wyatt wrote:
>>> Pid,
>>>
>>> Thank you very much for this response...
>>>
>>> Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does
>> now
>>> allow http://myipaddr:8100/pdf to display the files in the specified
>>> directory.
>>>
>>> However, my webapp still does not pull it from here; it reports that the
>>> resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing
> there
>>> is a file within the webapp that is over-riding, or over-ruling the
>>> 'default' that is now created?
>>>
>>> Can someone provide any advice on where to look next?
>>>
>>> Can someone provide some advice on what to do if I want to use more than
>> one
>>> pdf directory, where the second directory is not a subdirectory of the
>>> first?
>>>
>>> Regards,
>>>
>>> Bob
>>>
>>> -----Original Message-----
>>> From: Pid [mailto:p@pidster.com]
>>> Sent: Wednesday, June 21, 2006 05:04
>>> To: Tomcat Users List
>>> Subject: Re: pdf documents
>>>
>>> Don't you need to put the context file pdf.xml in a different place?
>>>
>>>
> $CATALINA_HOME/conf/<engine-prob-Catalina?>/<hostname-maybe-webapp?>/pdf.xml
>>> Once it's there you have to call the correct URL, which will be
>>> <webapp-path>/pdf/<file>.pdf
>>>
>>>
>>>
>>>
>>> Bob Wyatt wrote:
>>>> Mark,
>>>>
>>>> I appreciate all of your help and energy on my behalf...
>>>>
>>>> But alas, this does not work for me...
>>>>
>>>> "The requested resource (/myapp/jsp/app/C666119.pdf) is not
> available..."
>>>> I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I
>> modified
>>>> $CATALINA_HOME/webapps/pdf.xml to read:
>>>> # more pdf.xml
>>>> <Context docBase="/usr/lg/unformq" path="/pdf" > </Context>
>>>>
>>>> The test to http://myip:8100/pdf also fails with resource unavailable...
>>>>
>>>> The log file does not report any errors; the last entries are from the
>>>> shutdown and restart of tomcat...
>>>>
>>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>>> va.lang.String;@38a11b3b')
>>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>>> va.lang.String;@66cb5b3c')
>>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>>> va.lang.String;@1495b3c')
>>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]SessionListener:
>>>> contextDestroyed()
>>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>>> contextDestroyed()
>>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>>> ng.String;@195f9b3d')
>>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>>> ng.String;@4745b3d')
>>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>>> ng.String;@345db3d')
>>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]SessionListener:
>>>> contextDestroyed()
>>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>>> contextDestroyed()
>>>> 2006-06-20 19:25:39
>>>> StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter:
>>> init():
>>>> ruleChain: [org.apache.webapp.balan
>>>> cer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule:
>>> Target
>>>> string: News / Redirect URL: http://www.cnn.com], [org.a
>>>> pache.webapp.balancer.rules.RequestParameterRule: Target param name:
>>>> paramName / Target param value: paramValue / Redirect URL: http
>>>> ://www.yahoo.com],
>> [org.apache.webapp.balancer.rules.AcceptEverythingRule:
>>>> Redirect URL: http://jakarta.apache.org]]
>>>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]ContextListener:
>>>> contextInitialized()
>>>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]SessionListener:
>>>> contextInitialized()
>>>> 2006-06-20 19:25:39 StandardContext[/servlets-examples]ContextListener:
>>>> contextInitialized()
>>>> 2006-06-20 19:25:39 StandardContext[/servlets-examples]SessionListener:
>>>> contextInitialized()
>>>>
>>>> Regards,
>>>>
>>>> Bob
>>>>
>>>> -----Original Message-----
>>>> From: Mark Thomas [mailto:markt@apache.org]
>>>> Sent: Tuesday, June 20, 2006 19:14
>>>> To: Tomcat Users List
>>>> Subject: Re: pdf documents
>>>>
>>>> Bob Wyatt wrote:
>>>>> <Context docBase="/usr/test/pdf" > </Context>
>>>> Sorry, I should have read you post more carefully. The above works for
>>>> 5.5.x but for 5.0.x you will need
>>>> <Context docBase="/usr/test/pdf" path="/pdf" > </Context>
>>>>
>>>> On this version directory listings are enabled so http://host:port/pdf
>>>> should return a directory listing.
>>>>
>>>>> So I then copied pdf.xml to $CATALINA_HOME/webapps/appname/WEB-INF,
>>>> shutdown
>>>>> and restarted Tomcat, and I receive the same error message.
>>>> I don't think this would ever work. I'd delete this copy of pdf.xml so
>>>> it doesn't cause confusion down the road.
>>>>
>>>> If, after a restart, this still doesn't work have a look in
>>>> $CATALINA_HOME/logs and post the relevant sections of the logs.
>>>>
>>>> Mark
>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: pdf documents
Posted by Bob Wyatt <bw...@comcast.net>.
Pid,
HREF="C666119.pdf"
As no file path is in HREF, and pdf.xml is correct (as exhibited by
http://myipaddr:8100/pdf), should I be changing the path from /pdf to
/myapp/jsp/app, or are you advocating changing the app so the HREF becomes
/usr/lg/unformq/C666119.pdf? This latter one, I have no idea of where or how
to do it, but that does not mean it cannot be done.
Thanks for all of your help!
Regards,
Bob
-----Original Message-----
From: Pid [mailto:p@pidster.com]
Sent: Wednesday, June 21, 2006 11:11
To: Tomcat Users List
Subject: Re: pdf documents
Bob Wyatt wrote:
> Pid,
>
> I mean that it appears as though the webapp is looking in its own path for
> the pdf, and not the path of pdf files defined for Tomcat...
Yes, see below.
> The webapp true path would be:
> $CATALINA_HOME/webapps/myapp/jsp/app/C666119.pdf...
OK, that's a filing system path.
> We connect to it by http://myipaddr:8100/myapp
>
> The app 'myapp' is a third-party application we purchased...
>
> In this case, we have some myapp applications that pull up a fax log of
all
> fax transmissions for a user for the past 60 days. We are providing a link
> in that 'listing' to click to view the fax that was transmitted, which has
> been saved as a pdf file. As we have 150 users, there are hundreds of
these
> pdf files out there, and I do not want them under $CATALINA_HOME. It would
> appear that we cannot control (specify) the path in which it searches for
> the pdf files, although Tomcat can when given the proper url
> (http://myipaddr:8100/pdf).
(If I'm understanding this correctly it's not searching for anything.)
The user is clicking the PDF link, and getting a 404, yes?
If so, do a 'view source' on the HTML page, and tell me what's in the
href attribute of the link.
Is it href="C666119.pdf" or is it href="/myapp/some/path/C666119.pdf" or
something else?
> Can an app supersede the pdf search path, or ignore it entirely? Can this
> 'feature' be disabled?
There's no feature I'm afraid. The myapp isn't aware of the PDF context
you've installed to map the filing system to a URL, so it's ignoring it.
Either you must configure the app to write the correct URL for each
PDF*, or you must map the PDF context to the place that is generated by
the app**.
* By altering the HTML to point to the path you defined in pdf.xml.
** By altering context pdf.xml definition to create the correct path.
> Regards,
>
> Bob
P.S. Just reply to the list mate, I'm getting 2 copies...
> -----Original Message-----
> From: Pid [mailto:p@pidster.com]
> Sent: Wednesday, June 21, 2006 09:53
> To: Tomcat Users List
> Subject: Re: pdf documents
>
> np
>
> I don't understand why you're or your webapp is looking here:
> /myapp/jsp/app/C666119.pdf
>
> when the files are available here:
> /pdf/C666119.pdf
>
> Is the first a filesystem path, or a web URL?
> When you say "my webapp does not pull it from here", what do you mean by
> that? Sorry if I came to this late, but what does your webapp do and
> why is it looking there, and not at /pdf/C666119.pdf?
>
> Is it just a link that you're clicking or does your webapp download/open
> the PDF file?
>
>
>
>
>
> Bob Wyatt wrote:
>> Pid,
>>
>> Thank you very much for this response...
>>
>> Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does
> now
>> allow http://myipaddr:8100/pdf to display the files in the specified
>> directory.
>>
>> However, my webapp still does not pull it from here; it reports that the
>> resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing
there
>> is a file within the webapp that is over-riding, or over-ruling the
>> 'default' that is now created?
>>
>> Can someone provide any advice on where to look next?
>>
>> Can someone provide some advice on what to do if I want to use more than
> one
>> pdf directory, where the second directory is not a subdirectory of the
>> first?
>>
>> Regards,
>>
>> Bob
>>
>> -----Original Message-----
>> From: Pid [mailto:p@pidster.com]
>> Sent: Wednesday, June 21, 2006 05:04
>> To: Tomcat Users List
>> Subject: Re: pdf documents
>>
>> Don't you need to put the context file pdf.xml in a different place?
>>
>>
>
$CATALINA_HOME/conf/<engine-prob-Catalina?>/<hostname-maybe-webapp?>/pdf.xml
>> Once it's there you have to call the correct URL, which will be
>> <webapp-path>/pdf/<file>.pdf
>>
>>
>>
>>
>> Bob Wyatt wrote:
>>> Mark,
>>>
>>> I appreciate all of your help and energy on my behalf...
>>>
>>> But alas, this does not work for me...
>>>
>>> "The requested resource (/myapp/jsp/app/C666119.pdf) is not
available..."
>>>
>>> I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I
> modified
>>> $CATALINA_HOME/webapps/pdf.xml to read:
>>> # more pdf.xml
>>> <Context docBase="/usr/lg/unformq" path="/pdf" > </Context>
>>>
>>> The test to http://myip:8100/pdf also fails with resource unavailable...
>>>
>>> The log file does not report any errors; the last entries are from the
>>> shutdown and restart of tomcat...
>>>
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>> va.lang.String;@38a11b3b')
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>> va.lang.String;@66cb5b3c')
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>> va.lang.String;@1495b3c')
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]SessionListener:
>>> contextDestroyed()
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> contextDestroyed()
>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>> ng.String;@195f9b3d')
>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>> ng.String;@4745b3d')
>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>> ng.String;@345db3d')
>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]SessionListener:
>>> contextDestroyed()
>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>> contextDestroyed()
>>> 2006-06-20 19:25:39
>>> StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter:
>> init():
>>> ruleChain: [org.apache.webapp.balan
>>> cer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule:
>> Target
>>> string: News / Redirect URL: http://www.cnn.com], [org.a
>>> pache.webapp.balancer.rules.RequestParameterRule: Target param name:
>>> paramName / Target param value: paramValue / Redirect URL: http
>>> ://www.yahoo.com],
> [org.apache.webapp.balancer.rules.AcceptEverythingRule:
>>> Redirect URL: http://jakarta.apache.org]]
>>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]ContextListener:
>>> contextInitialized()
>>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]SessionListener:
>>> contextInitialized()
>>> 2006-06-20 19:25:39 StandardContext[/servlets-examples]ContextListener:
>>> contextInitialized()
>>> 2006-06-20 19:25:39 StandardContext[/servlets-examples]SessionListener:
>>> contextInitialized()
>>>
>>> Regards,
>>>
>>> Bob
>>>
>>> -----Original Message-----
>>> From: Mark Thomas [mailto:markt@apache.org]
>>> Sent: Tuesday, June 20, 2006 19:14
>>> To: Tomcat Users List
>>> Subject: Re: pdf documents
>>>
>>> Bob Wyatt wrote:
>>>> <Context docBase="/usr/test/pdf" > </Context>
>>> Sorry, I should have read you post more carefully. The above works for
>>> 5.5.x but for 5.0.x you will need
>>> <Context docBase="/usr/test/pdf" path="/pdf" > </Context>
>>>
>>> On this version directory listings are enabled so http://host:port/pdf
>>> should return a directory listing.
>>>
>>>> So I then copied pdf.xml to $CATALINA_HOME/webapps/appname/WEB-INF,
>>> shutdown
>>>> and restarted Tomcat, and I receive the same error message.
>>> I don't think this would ever work. I'd delete this copy of pdf.xml so
>>> it doesn't cause confusion down the road.
>>>
>>> If, after a restart, this still doesn't work have a look in
>>> $CATALINA_HOME/logs and post the relevant sections of the logs.
>>>
>>> Mark
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: pdf documents
Posted by Pid <p...@pidster.com>.
Bob Wyatt wrote:
> Pid,
>
> I mean that it appears as though the webapp is looking in its own path for
> the pdf, and not the path of pdf files defined for Tomcat...
Yes, see below.
> The webapp true path would be:
> $CATALINA_HOME/webapps/myapp/jsp/app/C666119.pdf...
OK, that's a filing system path.
> We connect to it by http://myipaddr:8100/myapp
>
> The app 'myapp' is a third-party application we purchased...
>
> In this case, we have some myapp applications that pull up a fax log of all
> fax transmissions for a user for the past 60 days. We are providing a link
> in that 'listing' to click to view the fax that was transmitted, which has
> been saved as a pdf file. As we have 150 users, there are hundreds of these
> pdf files out there, and I do not want them under $CATALINA_HOME. It would
> appear that we cannot control (specify) the path in which it searches for
> the pdf files, although Tomcat can when given the proper url
> (http://myipaddr:8100/pdf).
(If I'm understanding this correctly it's not searching for anything.)
The user is clicking the PDF link, and getting a 404, yes?
If so, do a 'view source' on the HTML page, and tell me what's in the
href attribute of the link.
Is it href="C666119.pdf" or is it href="/myapp/some/path/C666119.pdf" or
something else?
> Can an app supersede the pdf search path, or ignore it entirely? Can this
> 'feature' be disabled?
There's no feature I'm afraid. The myapp isn't aware of the PDF context
you've installed to map the filing system to a URL, so it's ignoring it.
Either you must configure the app to write the correct URL for each
PDF*, or you must map the PDF context to the place that is generated by
the app**.
* By altering the HTML to point to the path you defined in pdf.xml.
** By altering context pdf.xml definition to create the correct path.
> Regards,
>
> Bob
P.S. Just reply to the list mate, I'm getting 2 copies...
> -----Original Message-----
> From: Pid [mailto:p@pidster.com]
> Sent: Wednesday, June 21, 2006 09:53
> To: Tomcat Users List
> Subject: Re: pdf documents
>
> np
>
> I don't understand why you're or your webapp is looking here:
> /myapp/jsp/app/C666119.pdf
>
> when the files are available here:
> /pdf/C666119.pdf
>
> Is the first a filesystem path, or a web URL?
> When you say "my webapp does not pull it from here", what do you mean by
> that? Sorry if I came to this late, but what does your webapp do and
> why is it looking there, and not at /pdf/C666119.pdf?
>
> Is it just a link that you're clicking or does your webapp download/open
> the PDF file?
>
>
>
>
>
> Bob Wyatt wrote:
>> Pid,
>>
>> Thank you very much for this response...
>>
>> Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does
> now
>> allow http://myipaddr:8100/pdf to display the files in the specified
>> directory.
>>
>> However, my webapp still does not pull it from here; it reports that the
>> resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing there
>> is a file within the webapp that is over-riding, or over-ruling the
>> 'default' that is now created?
>>
>> Can someone provide any advice on where to look next?
>>
>> Can someone provide some advice on what to do if I want to use more than
> one
>> pdf directory, where the second directory is not a subdirectory of the
>> first?
>>
>> Regards,
>>
>> Bob
>>
>> -----Original Message-----
>> From: Pid [mailto:p@pidster.com]
>> Sent: Wednesday, June 21, 2006 05:04
>> To: Tomcat Users List
>> Subject: Re: pdf documents
>>
>> Don't you need to put the context file pdf.xml in a different place?
>>
>>
> $CATALINA_HOME/conf/<engine-prob-Catalina?>/<hostname-maybe-webapp?>/pdf.xml
>> Once it's there you have to call the correct URL, which will be
>> <webapp-path>/pdf/<file>.pdf
>>
>>
>>
>>
>> Bob Wyatt wrote:
>>> Mark,
>>>
>>> I appreciate all of your help and energy on my behalf...
>>>
>>> But alas, this does not work for me...
>>>
>>> "The requested resource (/myapp/jsp/app/C666119.pdf) is not available..."
>>>
>>> I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I
> modified
>>> $CATALINA_HOME/webapps/pdf.xml to read:
>>> # more pdf.xml
>>> <Context docBase="/usr/lg/unformq" path="/pdf" > </Context>
>>>
>>> The test to http://myip:8100/pdf also fails with resource unavailable...
>>>
>>> The log file does not report any errors; the last entries are from the
>>> shutdown and restart of tomcat...
>>>
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>> va.lang.String;@38a11b3b')
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>> va.lang.String;@66cb5b3c')
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>> va.lang.String;@1495b3c')
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]SessionListener:
>>> contextDestroyed()
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> contextDestroyed()
>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>> ng.String;@195f9b3d')
>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>> ng.String;@4745b3d')
>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>> ng.String;@345db3d')
>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]SessionListener:
>>> contextDestroyed()
>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>> contextDestroyed()
>>> 2006-06-20 19:25:39
>>> StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter:
>> init():
>>> ruleChain: [org.apache.webapp.balan
>>> cer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule:
>> Target
>>> string: News / Redirect URL: http://www.cnn.com], [org.a
>>> pache.webapp.balancer.rules.RequestParameterRule: Target param name:
>>> paramName / Target param value: paramValue / Redirect URL: http
>>> ://www.yahoo.com],
> [org.apache.webapp.balancer.rules.AcceptEverythingRule:
>>> Redirect URL: http://jakarta.apache.org]]
>>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]ContextListener:
>>> contextInitialized()
>>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]SessionListener:
>>> contextInitialized()
>>> 2006-06-20 19:25:39 StandardContext[/servlets-examples]ContextListener:
>>> contextInitialized()
>>> 2006-06-20 19:25:39 StandardContext[/servlets-examples]SessionListener:
>>> contextInitialized()
>>>
>>> Regards,
>>>
>>> Bob
>>>
>>> -----Original Message-----
>>> From: Mark Thomas [mailto:markt@apache.org]
>>> Sent: Tuesday, June 20, 2006 19:14
>>> To: Tomcat Users List
>>> Subject: Re: pdf documents
>>>
>>> Bob Wyatt wrote:
>>>> <Context docBase="/usr/test/pdf" > </Context>
>>> Sorry, I should have read you post more carefully. The above works for
>>> 5.5.x but for 5.0.x you will need
>>> <Context docBase="/usr/test/pdf" path="/pdf" > </Context>
>>>
>>> On this version directory listings are enabled so http://host:port/pdf
>>> should return a directory listing.
>>>
>>>> So I then copied pdf.xml to $CATALINA_HOME/webapps/appname/WEB-INF,
>>> shutdown
>>>> and restarted Tomcat, and I receive the same error message.
>>> I don't think this would ever work. I'd delete this copy of pdf.xml so
>>> it doesn't cause confusion down the road.
>>>
>>> If, after a restart, this still doesn't work have a look in
>>> $CATALINA_HOME/logs and post the relevant sections of the logs.
>>>
>>> Mark
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: pdf documents
Posted by Bob Wyatt <bw...@comcast.net>.
Martin,
Thank you for the reply...
I have no idea where to make the suggested changes...
I am really, really new to this and have zero experience with this...
If someone has the patience to help me, I would appreciate it!
Regards,
Bob
-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Wednesday, June 21, 2006 10:22
To: Tomcat Users List; p@pidster.com
Subject: Re: pdf documents
Hi Bob-
in your Tomcat servlet code you can read the file directly
in this example I am reading fubar.properties from folder /fu/bar
BufferedReader reader = new BufferedReader(new
FileReader("/fu/bar/fubar.properties"));
(If not you will have to supply URI such as
http://server:port/WebAppName/RelativePathToFile/filename)
Hope this helps,
Martin --
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed. If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy. Thank you.
----- Original Message -----
From: "Bob Wyatt" <bw...@comcast.net>
To: "'Tomcat Users List'" <us...@tomcat.apache.org>; <p...@pidster.com>
Sent: Wednesday, June 21, 2006 10:15 AM
Subject: RE: pdf documents
> Pid,
>
> I mean that it appears as though the webapp is looking in its own path for
> the pdf, and not the path of pdf files defined for Tomcat...
>
> The webapp true path would be:
> $CATALINA_HOME/webapps/myapp/jsp/app/C666119.pdf...
>
> We connect to it by http://myipaddr:8100/myapp
>
> The app 'myapp' is a third-party application we purchased...
>
> In this case, we have some myapp applications that pull up a fax log of
all
> fax transmissions for a user for the past 60 days. We are providing a link
> in that 'listing' to click to view the fax that was transmitted, which has
> been saved as a pdf file. As we have 150 users, there are hundreds of
these
> pdf files out there, and I do not want them under $CATALINA_HOME. It would
> appear that we cannot control (specify) the path in which it searches for
> the pdf files, although Tomcat can when given the proper url
> (http://myipaddr:8100/pdf).
>
> Can an app supersede the pdf search path, or ignore it entirely? Can this
> 'feature' be disabled?
>
> Regards,
>
> Bob
>
> -----Original Message-----
> From: Pid [mailto:p@pidster.com]
> Sent: Wednesday, June 21, 2006 09:53
> To: Tomcat Users List
> Subject: Re: pdf documents
>
> np
>
> I don't understand why you're or your webapp is looking here:
> /myapp/jsp/app/C666119.pdf
>
> when the files are available here:
> /pdf/C666119.pdf
>
> Is the first a filesystem path, or a web URL?
> When you say "my webapp does not pull it from here", what do you mean by
> that? Sorry if I came to this late, but what does your webapp do and
> why is it looking there, and not at /pdf/C666119.pdf?
>
> Is it just a link that you're clicking or does your webapp download/open
> the PDF file?
>
>
>
>
>
> Bob Wyatt wrote:
>> Pid,
>>
>> Thank you very much for this response...
>>
>> Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does
> now
>> allow http://myipaddr:8100/pdf to display the files in the specified
>> directory.
>>
>> However, my webapp still does not pull it from here; it reports that the
>> resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing
there
>> is a file within the webapp that is over-riding, or over-ruling the
>> 'default' that is now created?
>>
>> Can someone provide any advice on where to look next?
>>
>> Can someone provide some advice on what to do if I want to use more than
> one
>> pdf directory, where the second directory is not a subdirectory of the
>> first?
>>
>> Regards,
>>
>> Bob
>>
>> -----Original Message-----
>> From: Pid [mailto:p@pidster.com]
>> Sent: Wednesday, June 21, 2006 05:04
>> To: Tomcat Users List
>> Subject: Re: pdf documents
>>
>> Don't you need to put the context file pdf.xml in a different place?
>>
>>
>
$CATALINA_HOME/conf/<engine-prob-Catalina?>/<hostname-maybe-webapp?>/pdf.xml
>>
>> Once it's there you have to call the correct URL, which will be
>> <webapp-path>/pdf/<file>.pdf
>>
>>
>>
>>
>> Bob Wyatt wrote:
>>> Mark,
>>>
>>> I appreciate all of your help and energy on my behalf...
>>>
>>> But alas, this does not work for me...
>>>
>>> "The requested resource (/myapp/jsp/app/C666119.pdf) is not
available..."
>>>
>>> I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I
> modified
>>> $CATALINA_HOME/webapps/pdf.xml to read:
>>> # more pdf.xml
>>> <Context docBase="/usr/lg/unformq" path="/pdf" > </Context>
>>>
>>> The test to http://myip:8100/pdf also fails with resource unavailable...
>>>
>>> The log file does not report any errors; the last entries are from the
>>> shutdown and restart of tomcat...
>>>
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>> va.lang.String;@38a11b3b')
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>> va.lang.String;@66cb5b3c')
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>> va.lang.String;@1495b3c')
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]SessionListener:
>>> contextDestroyed()
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> contextDestroyed()
>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>> ng.String;@195f9b3d')
>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>> ng.String;@4745b3d')
>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>> ng.String;@345db3d')
>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]SessionListener:
>>> contextDestroyed()
>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>> contextDestroyed()
>>> 2006-06-20 19:25:39
>>> StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter:
>> init():
>>> ruleChain: [org.apache.webapp.balan
>>> cer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule:
>> Target
>>> string: News / Redirect URL: http://www.cnn.com], [org.a
>>> pache.webapp.balancer.rules.RequestParameterRule: Target param name:
>>> paramName / Target param value: paramValue / Redirect URL: http
>>> ://www.yahoo.com],
> [org.apache.webapp.balancer.rules.AcceptEverythingRule:
>>> Redirect URL: http://jakarta.apache.org]]
>>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]ContextListener:
>>> contextInitialized()
>>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]SessionListener:
>>> contextInitialized()
>>> 2006-06-20 19:25:39 StandardContext[/servlets-examples]ContextListener:
>>> contextInitialized()
>>> 2006-06-20 19:25:39 StandardContext[/servlets-examples]SessionListener:
>>> contextInitialized()
>>>
>>> Regards,
>>>
>>> Bob
>>>
>>> -----Original Message-----
>>> From: Mark Thomas [mailto:markt@apache.org]
>>> Sent: Tuesday, June 20, 2006 19:14
>>> To: Tomcat Users List
>>> Subject: Re: pdf documents
>>>
>>> Bob Wyatt wrote:
>>>> <Context docBase="/usr/test/pdf" > </Context>
>>> Sorry, I should have read you post more carefully. The above works for
>>> 5.5.x but for 5.0.x you will need
>>> <Context docBase="/usr/test/pdf" path="/pdf" > </Context>
>>>
>>> On this version directory listings are enabled so http://host:port/pdf
>>> should return a directory listing.
>>>
>>>> So I then copied pdf.xml to $CATALINA_HOME/webapps/appname/WEB-INF,
>>> shutdown
>>>> and restarted Tomcat, and I receive the same error message.
>>> I don't think this would ever work. I'd delete this copy of pdf.xml so
>>> it doesn't cause confusion down the road.
>>>
>>> If, after a restart, this still doesn't work have a look in
>>> $CATALINA_HOME/logs and post the relevant sections of the logs.
>>>
>>> Mark
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: pdf documents
Posted by Martin Gainty <mg...@hotmail.com>.
Hi Bob-
in your Tomcat servlet code you can read the file directly
in this example I am reading fubar.properties from folder /fu/bar
BufferedReader reader = new BufferedReader(new FileReader("/fu/bar/fubar.properties"));
(If not you will have to supply URI such as http://server:port/WebAppName/RelativePathToFile/filename)
Hope this helps,
Martin --
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed. If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy. Thank you.
----- Original Message -----
From: "Bob Wyatt" <bw...@comcast.net>
To: "'Tomcat Users List'" <us...@tomcat.apache.org>; <p...@pidster.com>
Sent: Wednesday, June 21, 2006 10:15 AM
Subject: RE: pdf documents
> Pid,
>
> I mean that it appears as though the webapp is looking in its own path for
> the pdf, and not the path of pdf files defined for Tomcat...
>
> The webapp true path would be:
> $CATALINA_HOME/webapps/myapp/jsp/app/C666119.pdf...
>
> We connect to it by http://myipaddr:8100/myapp
>
> The app 'myapp' is a third-party application we purchased...
>
> In this case, we have some myapp applications that pull up a fax log of all
> fax transmissions for a user for the past 60 days. We are providing a link
> in that 'listing' to click to view the fax that was transmitted, which has
> been saved as a pdf file. As we have 150 users, there are hundreds of these
> pdf files out there, and I do not want them under $CATALINA_HOME. It would
> appear that we cannot control (specify) the path in which it searches for
> the pdf files, although Tomcat can when given the proper url
> (http://myipaddr:8100/pdf).
>
> Can an app supersede the pdf search path, or ignore it entirely? Can this
> 'feature' be disabled?
>
> Regards,
>
> Bob
>
> -----Original Message-----
> From: Pid [mailto:p@pidster.com]
> Sent: Wednesday, June 21, 2006 09:53
> To: Tomcat Users List
> Subject: Re: pdf documents
>
> np
>
> I don't understand why you're or your webapp is looking here:
> /myapp/jsp/app/C666119.pdf
>
> when the files are available here:
> /pdf/C666119.pdf
>
> Is the first a filesystem path, or a web URL?
> When you say "my webapp does not pull it from here", what do you mean by
> that? Sorry if I came to this late, but what does your webapp do and
> why is it looking there, and not at /pdf/C666119.pdf?
>
> Is it just a link that you're clicking or does your webapp download/open
> the PDF file?
>
>
>
>
>
> Bob Wyatt wrote:
>> Pid,
>>
>> Thank you very much for this response...
>>
>> Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does
> now
>> allow http://myipaddr:8100/pdf to display the files in the specified
>> directory.
>>
>> However, my webapp still does not pull it from here; it reports that the
>> resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing there
>> is a file within the webapp that is over-riding, or over-ruling the
>> 'default' that is now created?
>>
>> Can someone provide any advice on where to look next?
>>
>> Can someone provide some advice on what to do if I want to use more than
> one
>> pdf directory, where the second directory is not a subdirectory of the
>> first?
>>
>> Regards,
>>
>> Bob
>>
>> -----Original Message-----
>> From: Pid [mailto:p@pidster.com]
>> Sent: Wednesday, June 21, 2006 05:04
>> To: Tomcat Users List
>> Subject: Re: pdf documents
>>
>> Don't you need to put the context file pdf.xml in a different place?
>>
>>
> $CATALINA_HOME/conf/<engine-prob-Catalina?>/<hostname-maybe-webapp?>/pdf.xml
>>
>> Once it's there you have to call the correct URL, which will be
>> <webapp-path>/pdf/<file>.pdf
>>
>>
>>
>>
>> Bob Wyatt wrote:
>>> Mark,
>>>
>>> I appreciate all of your help and energy on my behalf...
>>>
>>> But alas, this does not work for me...
>>>
>>> "The requested resource (/myapp/jsp/app/C666119.pdf) is not available..."
>>>
>>> I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I
> modified
>>> $CATALINA_HOME/webapps/pdf.xml to read:
>>> # more pdf.xml
>>> <Context docBase="/usr/lg/unformq" path="/pdf" > </Context>
>>>
>>> The test to http://myip:8100/pdf also fails with resource unavailable...
>>>
>>> The log file does not report any errors; the last entries are from the
>>> shutdown and restart of tomcat...
>>>
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>> va.lang.String;@38a11b3b')
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>> va.lang.String;@66cb5b3c')
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>> va.lang.String;@1495b3c')
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]SessionListener:
>>> contextDestroyed()
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> contextDestroyed()
>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>> ng.String;@195f9b3d')
>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>> ng.String;@4745b3d')
>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>>> ng.String;@345db3d')
>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]SessionListener:
>>> contextDestroyed()
>>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>>> contextDestroyed()
>>> 2006-06-20 19:25:39
>>> StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter:
>> init():
>>> ruleChain: [org.apache.webapp.balan
>>> cer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule:
>> Target
>>> string: News / Redirect URL: http://www.cnn.com], [org.a
>>> pache.webapp.balancer.rules.RequestParameterRule: Target param name:
>>> paramName / Target param value: paramValue / Redirect URL: http
>>> ://www.yahoo.com],
> [org.apache.webapp.balancer.rules.AcceptEverythingRule:
>>> Redirect URL: http://jakarta.apache.org]]
>>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]ContextListener:
>>> contextInitialized()
>>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]SessionListener:
>>> contextInitialized()
>>> 2006-06-20 19:25:39 StandardContext[/servlets-examples]ContextListener:
>>> contextInitialized()
>>> 2006-06-20 19:25:39 StandardContext[/servlets-examples]SessionListener:
>>> contextInitialized()
>>>
>>> Regards,
>>>
>>> Bob
>>>
>>> -----Original Message-----
>>> From: Mark Thomas [mailto:markt@apache.org]
>>> Sent: Tuesday, June 20, 2006 19:14
>>> To: Tomcat Users List
>>> Subject: Re: pdf documents
>>>
>>> Bob Wyatt wrote:
>>>> <Context docBase="/usr/test/pdf" > </Context>
>>> Sorry, I should have read you post more carefully. The above works for
>>> 5.5.x but for 5.0.x you will need
>>> <Context docBase="/usr/test/pdf" path="/pdf" > </Context>
>>>
>>> On this version directory listings are enabled so http://host:port/pdf
>>> should return a directory listing.
>>>
>>>> So I then copied pdf.xml to $CATALINA_HOME/webapps/appname/WEB-INF,
>>> shutdown
>>>> and restarted Tomcat, and I receive the same error message.
>>> I don't think this would ever work. I'd delete this copy of pdf.xml so
>>> it doesn't cause confusion down the road.
>>>
>>> If, after a restart, this still doesn't work have a look in
>>> $CATALINA_HOME/logs and post the relevant sections of the logs.
>>>
>>> Mark
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
RE: pdf documents
Posted by Bob Wyatt <bw...@comcast.net>.
Pid,
I mean that it appears as though the webapp is looking in its own path for
the pdf, and not the path of pdf files defined for Tomcat...
The webapp true path would be:
$CATALINA_HOME/webapps/myapp/jsp/app/C666119.pdf...
We connect to it by http://myipaddr:8100/myapp
The app 'myapp' is a third-party application we purchased...
In this case, we have some myapp applications that pull up a fax log of all
fax transmissions for a user for the past 60 days. We are providing a link
in that 'listing' to click to view the fax that was transmitted, which has
been saved as a pdf file. As we have 150 users, there are hundreds of these
pdf files out there, and I do not want them under $CATALINA_HOME. It would
appear that we cannot control (specify) the path in which it searches for
the pdf files, although Tomcat can when given the proper url
(http://myipaddr:8100/pdf).
Can an app supersede the pdf search path, or ignore it entirely? Can this
'feature' be disabled?
Regards,
Bob
-----Original Message-----
From: Pid [mailto:p@pidster.com]
Sent: Wednesday, June 21, 2006 09:53
To: Tomcat Users List
Subject: Re: pdf documents
np
I don't understand why you're or your webapp is looking here:
/myapp/jsp/app/C666119.pdf
when the files are available here:
/pdf/C666119.pdf
Is the first a filesystem path, or a web URL?
When you say "my webapp does not pull it from here", what do you mean by
that? Sorry if I came to this late, but what does your webapp do and
why is it looking there, and not at /pdf/C666119.pdf?
Is it just a link that you're clicking or does your webapp download/open
the PDF file?
Bob Wyatt wrote:
> Pid,
>
> Thank you very much for this response...
>
> Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does
now
> allow http://myipaddr:8100/pdf to display the files in the specified
> directory.
>
> However, my webapp still does not pull it from here; it reports that the
> resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing there
> is a file within the webapp that is over-riding, or over-ruling the
> 'default' that is now created?
>
> Can someone provide any advice on where to look next?
>
> Can someone provide some advice on what to do if I want to use more than
one
> pdf directory, where the second directory is not a subdirectory of the
> first?
>
> Regards,
>
> Bob
>
> -----Original Message-----
> From: Pid [mailto:p@pidster.com]
> Sent: Wednesday, June 21, 2006 05:04
> To: Tomcat Users List
> Subject: Re: pdf documents
>
> Don't you need to put the context file pdf.xml in a different place?
>
>
$CATALINA_HOME/conf/<engine-prob-Catalina?>/<hostname-maybe-webapp?>/pdf.xml
>
> Once it's there you have to call the correct URL, which will be
> <webapp-path>/pdf/<file>.pdf
>
>
>
>
> Bob Wyatt wrote:
>> Mark,
>>
>> I appreciate all of your help and energy on my behalf...
>>
>> But alas, this does not work for me...
>>
>> "The requested resource (/myapp/jsp/app/C666119.pdf) is not available..."
>>
>> I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I
modified
>> $CATALINA_HOME/webapps/pdf.xml to read:
>> # more pdf.xml
>> <Context docBase="/usr/lg/unformq" path="/pdf" > </Context>
>>
>> The test to http://myip:8100/pdf also fails with resource unavailable...
>>
>> The log file does not report any errors; the last entries are from the
>> shutdown and restart of tomcat...
>>
>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>> va.lang.String;@38a11b3b')
>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>> va.lang.String;@66cb5b3c')
>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>> va.lang.String;@1495b3c')
>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]SessionListener:
>> contextDestroyed()
>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>> contextDestroyed()
>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>> ng.String;@195f9b3d')
>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>> ng.String;@4745b3d')
>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>> ng.String;@345db3d')
>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]SessionListener:
>> contextDestroyed()
>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>> contextDestroyed()
>> 2006-06-20 19:25:39
>> StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter:
> init():
>> ruleChain: [org.apache.webapp.balan
>> cer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule:
> Target
>> string: News / Redirect URL: http://www.cnn.com], [org.a
>> pache.webapp.balancer.rules.RequestParameterRule: Target param name:
>> paramName / Target param value: paramValue / Redirect URL: http
>> ://www.yahoo.com],
[org.apache.webapp.balancer.rules.AcceptEverythingRule:
>> Redirect URL: http://jakarta.apache.org]]
>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]ContextListener:
>> contextInitialized()
>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]SessionListener:
>> contextInitialized()
>> 2006-06-20 19:25:39 StandardContext[/servlets-examples]ContextListener:
>> contextInitialized()
>> 2006-06-20 19:25:39 StandardContext[/servlets-examples]SessionListener:
>> contextInitialized()
>>
>> Regards,
>>
>> Bob
>>
>> -----Original Message-----
>> From: Mark Thomas [mailto:markt@apache.org]
>> Sent: Tuesday, June 20, 2006 19:14
>> To: Tomcat Users List
>> Subject: Re: pdf documents
>>
>> Bob Wyatt wrote:
>>> <Context docBase="/usr/test/pdf" > </Context>
>> Sorry, I should have read you post more carefully. The above works for
>> 5.5.x but for 5.0.x you will need
>> <Context docBase="/usr/test/pdf" path="/pdf" > </Context>
>>
>> On this version directory listings are enabled so http://host:port/pdf
>> should return a directory listing.
>>
>>> So I then copied pdf.xml to $CATALINA_HOME/webapps/appname/WEB-INF,
>> shutdown
>>> and restarted Tomcat, and I receive the same error message.
>> I don't think this would ever work. I'd delete this copy of pdf.xml so
>> it doesn't cause confusion down the road.
>>
>> If, after a restart, this still doesn't work have a look in
>> $CATALINA_HOME/logs and post the relevant sections of the logs.
>>
>> Mark
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: pdf documents
Posted by Pid <p...@pidster.com>.
np
I don't understand why you're or your webapp is looking here:
/myapp/jsp/app/C666119.pdf
when the files are available here:
/pdf/C666119.pdf
Is the first a filesystem path, or a web URL?
When you say "my webapp does not pull it from here", what do you mean by
that? Sorry if I came to this late, but what does your webapp do and
why is it looking there, and not at /pdf/C666119.pdf?
Is it just a link that you're clicking or does your webapp download/open
the PDF file?
Bob Wyatt wrote:
> Pid,
>
> Thank you very much for this response...
>
> Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does now
> allow http://myipaddr:8100/pdf to display the files in the specified
> directory.
>
> However, my webapp still does not pull it from here; it reports that the
> resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing there
> is a file within the webapp that is over-riding, or over-ruling the
> 'default' that is now created?
>
> Can someone provide any advice on where to look next?
>
> Can someone provide some advice on what to do if I want to use more than one
> pdf directory, where the second directory is not a subdirectory of the
> first?
>
> Regards,
>
> Bob
>
> -----Original Message-----
> From: Pid [mailto:p@pidster.com]
> Sent: Wednesday, June 21, 2006 05:04
> To: Tomcat Users List
> Subject: Re: pdf documents
>
> Don't you need to put the context file pdf.xml in a different place?
>
> $CATALINA_HOME/conf/<engine-prob-Catalina?>/<hostname-maybe-webapp?>/pdf.xml
>
> Once it's there you have to call the correct URL, which will be
> <webapp-path>/pdf/<file>.pdf
>
>
>
>
> Bob Wyatt wrote:
>> Mark,
>>
>> I appreciate all of your help and energy on my behalf...
>>
>> But alas, this does not work for me...
>>
>> "The requested resource (/myapp/jsp/app/C666119.pdf) is not available..."
>>
>> I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I modified
>> $CATALINA_HOME/webapps/pdf.xml to read:
>> # more pdf.xml
>> <Context docBase="/usr/lg/unformq" path="/pdf" > </Context>
>>
>> The test to http://myip:8100/pdf also fails with resource unavailable...
>>
>> The log file does not report any errors; the last entries are from the
>> shutdown and restart of tomcat...
>>
>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>> va.lang.String;@38a11b3b')
>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>> va.lang.String;@66cb5b3c')
>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>> va.lang.String;@1495b3c')
>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]SessionListener:
>> contextDestroyed()
>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>> contextDestroyed()
>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>> ng.String;@195f9b3d')
>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>> ng.String;@4745b3d')
>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>> ng.String;@345db3d')
>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]SessionListener:
>> contextDestroyed()
>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>> contextDestroyed()
>> 2006-06-20 19:25:39
>> StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter:
> init():
>> ruleChain: [org.apache.webapp.balan
>> cer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule:
> Target
>> string: News / Redirect URL: http://www.cnn.com], [org.a
>> pache.webapp.balancer.rules.RequestParameterRule: Target param name:
>> paramName / Target param value: paramValue / Redirect URL: http
>> ://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule:
>> Redirect URL: http://jakarta.apache.org]]
>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]ContextListener:
>> contextInitialized()
>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]SessionListener:
>> contextInitialized()
>> 2006-06-20 19:25:39 StandardContext[/servlets-examples]ContextListener:
>> contextInitialized()
>> 2006-06-20 19:25:39 StandardContext[/servlets-examples]SessionListener:
>> contextInitialized()
>>
>> Regards,
>>
>> Bob
>>
>> -----Original Message-----
>> From: Mark Thomas [mailto:markt@apache.org]
>> Sent: Tuesday, June 20, 2006 19:14
>> To: Tomcat Users List
>> Subject: Re: pdf documents
>>
>> Bob Wyatt wrote:
>>> <Context docBase="/usr/test/pdf" > </Context>
>> Sorry, I should have read you post more carefully. The above works for
>> 5.5.x but for 5.0.x you will need
>> <Context docBase="/usr/test/pdf" path="/pdf" > </Context>
>>
>> On this version directory listings are enabled so http://host:port/pdf
>> should return a directory listing.
>>
>>> So I then copied pdf.xml to $CATALINA_HOME/webapps/appname/WEB-INF,
>> shutdown
>>> and restarted Tomcat, and I receive the same error message.
>> I don't think this would ever work. I'd delete this copy of pdf.xml so
>> it doesn't cause confusion down the road.
>>
>> If, after a restart, this still doesn't work have a look in
>> $CATALINA_HOME/logs and post the relevant sections of the logs.
>>
>> Mark
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: pdf documents
Posted by Bob Wyatt <bw...@comcast.net>.
Pid,
Thank you very much for this response...
Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does now
allow http://myipaddr:8100/pdf to display the files in the specified
directory.
However, my webapp still does not pull it from here; it reports that the
resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing there
is a file within the webapp that is over-riding, or over-ruling the
'default' that is now created?
Can someone provide any advice on where to look next?
Can someone provide some advice on what to do if I want to use more than one
pdf directory, where the second directory is not a subdirectory of the
first?
Regards,
Bob
-----Original Message-----
From: Pid [mailto:p@pidster.com]
Sent: Wednesday, June 21, 2006 05:04
To: Tomcat Users List
Subject: Re: pdf documents
Don't you need to put the context file pdf.xml in a different place?
$CATALINA_HOME/conf/<engine-prob-Catalina?>/<hostname-maybe-webapp?>/pdf.xml
Once it's there you have to call the correct URL, which will be
<webapp-path>/pdf/<file>.pdf
Bob Wyatt wrote:
> Mark,
>
> I appreciate all of your help and energy on my behalf...
>
> But alas, this does not work for me...
>
> "The requested resource (/myapp/jsp/app/C666119.pdf) is not available..."
>
> I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I modified
> $CATALINA_HOME/webapps/pdf.xml to read:
> # more pdf.xml
> <Context docBase="/usr/lg/unformq" path="/pdf" > </Context>
>
> The test to http://myip:8100/pdf also fails with resource unavailable...
>
> The log file does not report any errors; the last entries are from the
> shutdown and restart of tomcat...
>
> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
> va.lang.String;@38a11b3b')
> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
> va.lang.String;@66cb5b3c')
> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
> va.lang.String;@1495b3c')
> 2006-06-20 19:24:58 StandardContext[/servlets-examples]SessionListener:
> contextDestroyed()
> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
> contextDestroyed()
> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
> ng.String;@195f9b3d')
> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
> ng.String;@4745b3d')
> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
> ng.String;@345db3d')
> 2006-06-20 19:24:58 StandardContext[/jsp-examples]SessionListener:
> contextDestroyed()
> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
> contextDestroyed()
> 2006-06-20 19:25:39
> StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter:
init():
> ruleChain: [org.apache.webapp.balan
> cer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule:
Target
> string: News / Redirect URL: http://www.cnn.com], [org.a
> pache.webapp.balancer.rules.RequestParameterRule: Target param name:
> paramName / Target param value: paramValue / Redirect URL: http
> ://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule:
> Redirect URL: http://jakarta.apache.org]]
> 2006-06-20 19:25:39 StandardContext[/jsp-examples]ContextListener:
> contextInitialized()
> 2006-06-20 19:25:39 StandardContext[/jsp-examples]SessionListener:
> contextInitialized()
> 2006-06-20 19:25:39 StandardContext[/servlets-examples]ContextListener:
> contextInitialized()
> 2006-06-20 19:25:39 StandardContext[/servlets-examples]SessionListener:
> contextInitialized()
>
> Regards,
>
> Bob
>
> -----Original Message-----
> From: Mark Thomas [mailto:markt@apache.org]
> Sent: Tuesday, June 20, 2006 19:14
> To: Tomcat Users List
> Subject: Re: pdf documents
>
> Bob Wyatt wrote:
>> <Context docBase="/usr/test/pdf" > </Context>
>
> Sorry, I should have read you post more carefully. The above works for
> 5.5.x but for 5.0.x you will need
> <Context docBase="/usr/test/pdf" path="/pdf" > </Context>
>
> On this version directory listings are enabled so http://host:port/pdf
> should return a directory listing.
>
>> So I then copied pdf.xml to $CATALINA_HOME/webapps/appname/WEB-INF,
> shutdown
>> and restarted Tomcat, and I receive the same error message.
>
> I don't think this would ever work. I'd delete this copy of pdf.xml so
> it doesn't cause confusion down the road.
>
> If, after a restart, this still doesn't work have a look in
> $CATALINA_HOME/logs and post the relevant sections of the logs.
>
> Mark
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: pdf documents
Posted by Pid <p...@pidster.com>.
Don't you need to put the context file pdf.xml in a different place?
$CATALINA_HOME/conf/<engine-prob-Catalina?>/<hostname-maybe-webapp?>/pdf.xml
Once it's there you have to call the correct URL, which will be
<webapp-path>/pdf/<file>.pdf
Bob Wyatt wrote:
> Mark,
>
> I appreciate all of your help and energy on my behalf...
>
> But alas, this does not work for me...
>
> "The requested resource (/myapp/jsp/app/C666119.pdf) is not available..."
>
> I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I modified
> $CATALINA_HOME/webapps/pdf.xml to read:
> # more pdf.xml
> <Context docBase="/usr/lg/unformq" path="/pdf" > </Context>
>
> The test to http://myip:8100/pdf also fails with resource unavailable...
>
> The log file does not report any errors; the last entries are from the
> shutdown and restart of tomcat...
>
> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
> va.lang.String;@38a11b3b')
> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
> va.lang.String;@66cb5b3c')
> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
> va.lang.String;@1495b3c')
> 2006-06-20 19:24:58 StandardContext[/servlets-examples]SessionListener:
> contextDestroyed()
> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
> contextDestroyed()
> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
> ng.String;@195f9b3d')
> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
> ng.String;@4745b3d')
> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
> ng.String;@345db3d')
> 2006-06-20 19:24:58 StandardContext[/jsp-examples]SessionListener:
> contextDestroyed()
> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
> contextDestroyed()
> 2006-06-20 19:25:39
> StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init():
> ruleChain: [org.apache.webapp.balan
> cer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target
> string: News / Redirect URL: http://www.cnn.com], [org.a
> pache.webapp.balancer.rules.RequestParameterRule: Target param name:
> paramName / Target param value: paramValue / Redirect URL: http
> ://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule:
> Redirect URL: http://jakarta.apache.org]]
> 2006-06-20 19:25:39 StandardContext[/jsp-examples]ContextListener:
> contextInitialized()
> 2006-06-20 19:25:39 StandardContext[/jsp-examples]SessionListener:
> contextInitialized()
> 2006-06-20 19:25:39 StandardContext[/servlets-examples]ContextListener:
> contextInitialized()
> 2006-06-20 19:25:39 StandardContext[/servlets-examples]SessionListener:
> contextInitialized()
>
> Regards,
>
> Bob
>
> -----Original Message-----
> From: Mark Thomas [mailto:markt@apache.org]
> Sent: Tuesday, June 20, 2006 19:14
> To: Tomcat Users List
> Subject: Re: pdf documents
>
> Bob Wyatt wrote:
>> <Context docBase="/usr/test/pdf" > </Context>
>
> Sorry, I should have read you post more carefully. The above works for
> 5.5.x but for 5.0.x you will need
> <Context docBase="/usr/test/pdf" path="/pdf" > </Context>
>
> On this version directory listings are enabled so http://host:port/pdf
> should return a directory listing.
>
>> So I then copied pdf.xml to $CATALINA_HOME/webapps/appname/WEB-INF,
> shutdown
>> and restarted Tomcat, and I receive the same error message.
>
> I don't think this would ever work. I'd delete this copy of pdf.xml so
> it doesn't cause confusion down the road.
>
> If, after a restart, this still doesn't work have a look in
> $CATALINA_HOME/logs and post the relevant sections of the logs.
>
> Mark
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: pdf documents
Posted by Bob Wyatt <bw...@comcast.net>.
Mark,
I appreciate all of your help and energy on my behalf...
But alas, this does not work for me...
"The requested resource (/myapp/jsp/app/C666119.pdf) is not available..."
I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I modified
$CATALINA_HOME/webapps/pdf.xml to read:
# more pdf.xml
<Context docBase="/usr/lg/unformq" path="/pdf" > </Context>
The test to http://myip:8100/pdf also fails with resource unavailable...
The log file does not report any errors; the last entries are from the
shutdown and restart of tomcat...
2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
va.lang.String;@38a11b3b')
2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
va.lang.String;@66cb5b3c')
2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
va.lang.String;@1495b3c')
2006-06-20 19:24:58 StandardContext[/servlets-examples]SessionListener:
contextDestroyed()
2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
contextDestroyed()
2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
ng.String;@195f9b3d')
2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
ng.String;@4745b3d')
2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
ng.String;@345db3d')
2006-06-20 19:24:58 StandardContext[/jsp-examples]SessionListener:
contextDestroyed()
2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
contextDestroyed()
2006-06-20 19:25:39
StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init():
ruleChain: [org.apache.webapp.balan
cer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target
string: News / Redirect URL: http://www.cnn.com], [org.a
pache.webapp.balancer.rules.RequestParameterRule: Target param name:
paramName / Target param value: paramValue / Redirect URL: http
://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule:
Redirect URL: http://jakarta.apache.org]]
2006-06-20 19:25:39 StandardContext[/jsp-examples]ContextListener:
contextInitialized()
2006-06-20 19:25:39 StandardContext[/jsp-examples]SessionListener:
contextInitialized()
2006-06-20 19:25:39 StandardContext[/servlets-examples]ContextListener:
contextInitialized()
2006-06-20 19:25:39 StandardContext[/servlets-examples]SessionListener:
contextInitialized()
Regards,
Bob
-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org]
Sent: Tuesday, June 20, 2006 19:14
To: Tomcat Users List
Subject: Re: pdf documents
Bob Wyatt wrote:
> <Context docBase="/usr/test/pdf" > </Context>
Sorry, I should have read you post more carefully. The above works for
5.5.x but for 5.0.x you will need
<Context docBase="/usr/test/pdf" path="/pdf" > </Context>
On this version directory listings are enabled so http://host:port/pdf
should return a directory listing.
> So I then copied pdf.xml to $CATALINA_HOME/webapps/appname/WEB-INF,
shutdown
> and restarted Tomcat, and I receive the same error message.
I don't think this would ever work. I'd delete this copy of pdf.xml so
it doesn't cause confusion down the road.
If, after a restart, this still doesn't work have a look in
$CATALINA_HOME/logs and post the relevant sections of the logs.
Mark
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: pdf documents
Posted by Mark Thomas <ma...@apache.org>.
Bob Wyatt wrote:
> <Context docBase="/usr/test/pdf" > </Context>
Sorry, I should have read you post more carefully. The above works for
5.5.x but for 5.0.x you will need
<Context docBase="/usr/test/pdf" path="/pdf" > </Context>
On this version directory listings are enabled so http://host:port/pdf
should return a directory listing.
> So I then copied pdf.xml to $CATALINA_HOME/webapps/appname/WEB-INF, shutdown
> and restarted Tomcat, and I receive the same error message.
I don't think this would ever work. I'd delete this copy of pdf.xml so
it doesn't cause confusion down the road.
If, after a restart, this still doesn't work have a look in
$CATALINA_HOME/logs and post the relevant sections of the logs.
Mark
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: pdf documents
Posted by Bob Wyatt <bw...@comcast.net>.
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:markt@apache.org]
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: pdf documents
Posted by Mark Thomas <ma...@apache.org>.
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: pdf documents
Posted by Bob Wyatt <bw...@comcast.net>.
Mark,
No... Didn't know about it...
Now that I know about it (Thank You), I'm not sure of what really needs to
be done...
No where under $CATALINA_HOME do I have a defaultcontext.xml, context.xml,
or similarly named file. All of my similarly named files are *.html files or
directories, as follows:
#pwd
/usr/local/jakarta-tomcat-5
# find . -name \*context\* -print
./server/webapps/admin/context
./server/webapps/admin/defaultcontext
./webapps/tomcat-docs/config/printer/context.html
./webapps/tomcat-docs/config/printer/defaultcontext.html
./webapps/tomcat-docs/config/context.html
./webapps/tomcat-docs/config/defaultcontext.html
./webapps/wade2/scripts/contextmenu.css
So I'm not sure what to do - any advice?
Regards,
Bob
-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org]
Sent: Monday, June 19, 2006 21:13
To: Tomcat Users List
Subject: Re: pdf documents
Bob Wyatt wrote:
> I have a directory that contains hundreds of pdf files.
>
> I have Tomcat 5.0.28 running on AIX 5.2.
>
> Under the webapps/appname directory, if I create a symbolic link to the
pdf
> files, they will not display.
Have you enabled linking? See the allowLinking property at
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
Mark
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: pdf documents
Posted by Mark Thomas <ma...@apache.org>.
Bob Wyatt wrote:
> I have a directory that contains hundreds of pdf files.
>
> I have Tomcat 5.0.28 running on AIX 5.2.
>
> Under the webapps/appname directory, if I create a symbolic link to the pdf
> files, they will not display.
Have you enabled linking? See the allowLinking property at
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
Mark
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org