how I can read file from tomcat 6.0.18 s temp directory ?
Joined: Jul 25, 2009
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 .......
Joined: Sep 06, 2009
can you please paste the code that you are using and the directory structure where the image file is.
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.