Re: serving content from outside the context

2005-10-12 Thread Darryl L. Miles

John Laughton wrote:


Hi, I hope this is the right mailing list for this question

I am using tomcat 5.0.28
I have a simple web app and want to serve up some images in the jsp 
pages, but the images are outside the context


The HTTP statement looks like
trtd
img alt=thumb image src=/data/webData/family/DSC01183.JPG/
/td/tr

The web app is under /usr/local/tomcat/webapp/family
On the browser it only shows thumb image as it cannot get to the 
hyperlink http://xx.xx.xx.xx/data/webData/family/DSC01183.JPG

(IP shown as xx.xx.xx.xx for security)

I have read a lot about tomcat and figure there must be a way to 
configure server.xml and/or web.xml to allow this to work, but cannot 
see it ?


It is possible ?


Are you wanting TC to serve the static files or do you use AJP connector 
and Apache.  The easiest way to serve files from outside is to let 
Apache serve them and configure up AJP connector, then mount the entire 
content or just *.jsp pages to TC.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: serving content from outside the context

2005-10-12 Thread Arup Vidyerthy
Or if you don't want to do what Darryl is suggesting you can configure your
tomcat to use unix symlinks by setting the allowLinking attribute to true.

Then you can simply create a softlink inside your webapp directory that
points to your data directory.

That will work as well.

Arup 

-Original Message-
From: Darryl L. Miles [mailto:[EMAIL PROTECTED] 
Sent: 12 October 2005 09:59
To: Tomcat Users List
Subject: Re: serving content from outside the context

John Laughton wrote:

 Hi, I hope this is the right mailing list for this question

 I am using tomcat 5.0.28
 I have a simple web app and want to serve up some images in the jsp 
 pages, but the images are outside the context

 The HTTP statement looks like
 trtd
 img alt=thumb image src=/data/webData/family/DSC01183.JPG/
 /td/tr

 The web app is under /usr/local/tomcat/webapp/family On the browser it 
 only shows thumb image as it cannot get to the hyperlink 
 http://xx.xx.xx.xx/data/webData/family/DSC01183.JPG
 (IP shown as xx.xx.xx.xx for security)

 I have read a lot about tomcat and figure there must be a way to 
 configure server.xml and/or web.xml to allow this to work, but cannot 
 see it ?

 It is possible ?

Are you wanting TC to serve the static files or do you use AJP connector and
Apache.  The easiest way to serve files from outside is to let Apache serve
them and configure up AJP connector, then mount the entire content or just
*.jsp pages to TC.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





___ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail 
http://uk.messenger.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: serving content from outside the context

2005-10-12 Thread John Laughton

Thanks for the suggestions
I didn't really want to run Apache, especially as I have tomcat (which is 
suppose to be a web server - I thought ?)


For now I have added a file to
.../tomcat/conf/Catalina/localhost/myData.xml
This xml file contains

?xml version='1.0' encoding='utf-8'?
Context path = /myData docBase=/data/webData
/Context

now I can access http://xx.xx.xx.xx/myData/

In the dir /data/webData, I created a WEB-INF and a WEB-INF/web.xml

I guess what I have done is created a new context in the area of my hard 
drive where the static jpg files exist

The only issue I have is that I expose /data/webData part of my hard drive

John
At 10:06 AM 10/12/2005 +0100, Arup Vidyerthy wrote:

Or if you don't want to do what Darryl is suggesting you can configure your
tomcat to use unix symlinks by setting the allowLinking attribute to true.

Then you can simply create a softlink inside your webapp directory that
points to your data directory.

That will work as well.

Arup

-Original Message-
From: Darryl L. Miles [mailto:[EMAIL PROTECTED]
Sent: 12 October 2005 09:59
To: Tomcat Users List
Subject: Re: serving content from outside the context

John Laughton wrote:

 Hi, I hope this is the right mailing list for this question

 I am using tomcat 5.0.28
 I have a simple web app and want to serve up some images in the jsp
 pages, but the images are outside the context

 The HTTP statement looks like
 trtd
 img alt=thumb image src=/data/webData/family/DSC01183.JPG/
 /td/tr

 The web app is under /usr/local/tomcat/webapp/family On the browser it
 only shows thumb image as it cannot get to the hyperlink
 http://xx.xx.xx.xx/data/webData/family/DSC01183.JPG
 (IP shown as xx.xx.xx.xx for security)

 I have read a lot about tomcat and figure there must be a way to
 configure server.xml and/or web.xml to allow this to work, but cannot
 see it ?

 It is possible ?

Are you wanting TC to serve the static files or do you use AJP connector and
Apache.  The easiest way to serve files from outside is to let Apache serve
them and configure up AJP connector, then mount the entire content or just
*.jsp pages to TC.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





___
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with 
voicemail http://uk.messenger.yahoo.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


*
  John Laughton,Cisco Systems
  ([EMAIL PROTECTED])
  408.902.3592 (voicemail and fax)
  page - 1 800 365 4578
*