in a
format that I can create a file under the logs
directory, without assuming where Tomcat is deployed?
-d
Caldarale, Charles R wrote:
From: David.Meldrum [mailto:david.meld...@verizon.net] Subject: Re:
Path problem
actually in my case I am trying to read/write from a ContextListenr
It's
popprem wrote:
Hi,
I'v really stuck with an issue. I have done a web program using struts
framework. I have a plugin class there for which i have to pass a
configuration file as parameter. That file is in webapps/Myapp/WEB-INF/
directory. So i mentioned relative path as
From: popprem [mailto:popp...@gmail.com]
Subject: Path problem
David answered the critical part of your question, but I thought I'd take a
crack at the rest.
That means tomcat defaultly points to bin directory
Tomcat doesn't defaultly [sic] point to anything. The current directory of
the
I still have questions about the path to a file. {This is within a
servlet... actually in my case I am trying to read/write from a
ContextListenr} I understand that just opening a FIle will be relative
to where Tomcat was started. Is there a simple java method (and on what
class) that will
From: David.Meldrum [mailto:david.meld...@verizon.net]
Subject: Re: Path problem
actually in my case I am trying to read/write from a
ContextListenr
It's generally a bad idea to ever *write* into the webapp deployment space.
You have no guarantee that the space is writable, nor
Caldarale, Charles R wrote:
[...]
It's generally a bad idea to ever *write* into the webapp deployment space. You have
no guarantee that the space is writable, nor that the container will provide any
write access. You're much better off writing to files outside of Tomcat's directory
Or the war-file doesn't get unpacked, but the app is started from
within the war, and the ressource is inside the war.
And please note the difference:
It's not Class.getRessourceAsStream(), but
ServletContext.getRessourceAsStream();
So in your example:
ServletContext sctx =
...and please forgive me all my typos
Rgds
Gregor
--
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
a file under /logs?
Is there some way to determine the path to the /logs directory in a
format that I can create a file under the logs
directory, without assuming where Tomcat is deployed?
-d
Caldarale, Charles R wrote:
From: David.Meldrum [mailto:david.meld...@verizon.net]
Subject: Re: Path problem
From: David.Meldrum [mailto:david.meld...@verizon.net]
Subject: Re: Path problem
For example, how do I get a reference to the
/webapps/MyWebApp/WEB-INF/foo.properties file?
Gregor already told you here:
http://marc.info/?l=tomcat-userm=123697177925016w=2
Caldarale, Charles R wrote:
From: David.Meldrum [mailto:david.meld...@verizon.net] Subject: Re:
Path problem
actually in my case I am trying to read/write from a ContextListenr
It's generally a bad idea to ever *write* into the webapp deployment
space. You have no guarantee
11 matches
Mail list logo