| 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
|
|
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.
|
 |
 |
|
|
subject: how I can read file from tomcat 6.0.18 s temp directory ?
|
|
|