This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Tomcat and the fly likes how to access images that are not in war file??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "how to access images that are not in war file???" Watch "how to access images that are not in war file???" New topic
Author

how to access images that are not in war file???

Rajan Punchouty
Greenhorn

Joined: Mar 15, 2004
Posts: 21
Hi,
I have upload directory for images on my hard disk. I want to access them in HTML image tag. how to access them with respect to application context. As example C:/upload has images and i put my war file in C:/tomcat/webapps.
Thanx in advance,
Rajan
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12756
    
    5
There are two possibilities:
1. Put the image files where the web server is allowed to serve from - which would be under tomcat/webapps/somecontext and use a src in the image tag that points to that directory. Note that the web server will not normally be allowed to serve files from C:/upload
2. Serve the images via a servlet - in which case the src will have to point to the servlet and include the image file nam.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to access images that are not in war file???
 
Similar Threads
Serving Up Image Outside of Root
Cannot login into tomcat
Deploying WAR files on a shared host?
My webhosting company asked me to rename my .war file into ROOT.war
How to acess file outside a War file.