> 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 process you used to start Tomcat when using the script happened to be 
Tomcat's bin directory - but that's just the way you're using the script, not a 
Tomcat requirement.

> When i used tomcat.exe & installed tomcat in my machine & run 
> the program,i found that the test file i created in my code 
> level was in windows/system32/ directory.

Because that's the default current directory for services.

It's almost always a bad idea to depend on the current directory setting in a 
complex server environment; if you must have a file system path to something, 
better to use one based off a system property.  In your case, the 
getResourceAsStream() method is much preferred, since it elinates any file 
system dependencies.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to