aspose file tools
The moose likes Tomcat and the fly likes how I can read file from tomcat 6.0.18 s temp directory ? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Tomcat
Reply Bookmark "how I can read file from tomcat 6.0.18 s temp directory ? " Watch "how I can read file from tomcat 6.0.18 s temp directory ? " New topic
Author

how I can read file from tomcat 6.0.18 s temp directory ?

Harasshal Patil
Greenhorn

Joined: Jul 25, 2009
Posts: 1
Hiiii to All

i am not able to read image file from tomcat directory on my jsp ......

is there any solution for this problem...?
i use System.getenv("CATALINA_HOME") For getting tomcat directory path......
but i am in my context scope...
due to i m not able to read that image file........

is there any solution for this.???




thanks in advance .......


Salil Vverma
Ranch Hand

Joined: Sep 06, 2009
Posts: 219
can you please paste the code that you are using and the directory structure where the image file is.


Regards
Salil Verma
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14475
    
    7

I'm getting mixed messages here. If you want the temp directory that your tomcat app is using, use the java.io.File tempfile facilities or look at the tempfile System property. Tomcat will setup that property when it starts and the tempfile functions will use it. You don't need to code Tomcat-specific references, just general tempfile stuff.

The tomcat application directory on the other hand is a different matter. Among other things, it's not actually guaranteed to even be a directory. For finding stuff in your WAR, use the classpath resources functions. But just to repeat, DON'T let your application write files into the WAR itself. Even when it works it's trouble.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: how I can read file from tomcat 6.0.18 s temp directory ?
 
Similar Threads
how to display only directories through browse button
Giving path alias to network folder in server.xml
unable to view index.html pahe in webapps folder
Uploading file from Tomcat-Aoache server to IIS web server
Load Image or Movie files from URL & store the files to local directory