This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Creating a shared folder accross WebApps Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Creating a shared folder accross WebApps" Watch "Creating a shared folder accross WebApps" New topic
Author

Creating a shared folder accross WebApps

Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
I know there are shared folders available for JARS, classes etc in Tomcat, but are there/is it possible to create a folder for images?

I jhave several webapps running off Tomcat (AT 5.5.12) all of which need access to a collection of images. What I don't want to have to do is, copy the same images in EVERY webapp (there are approx 1,500 images totalling around 120MB) so I was hoping I could create a shared/img folder or summin and well each webapp to look under there.

Is it possible!?

Cheers
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
is it possible to create a folder for images?

That depends on how you are serving the images! IF you are using img tags that point directly to an image file, the built in Tomcat default servlet will obey the web application rules that do not allow for a "shared" folder.
However, if you use your own image serving servlet, it can pick up images from anywhere.
Ben Souther has an example of a servlet for images - see Simple Stream on this site
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating a shared folder accross WebApps