I assume you mean web application, not applet.  

An alternative is for the webapp to read the file from "somewhere on the classpath".  
I have not tried it and don't know the exact technique, but you should be able to find 
how to do it.  Then you could put your file in web-inf/classes in your .war file.

-----Original Message-----
From: ext Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 22, 2004 7:52 AM
To: Tomcat Users List
Subject: RE: default directory for files in tomcat



Howdy,
The "default" location for files is the "current working directory"
which is the directory from which the startup script is launched.
Needless to say, relying on this is fragile at best.  So you want to
write your applet such that the location of the .ini file is a
parameter, and pass your applet this parameter (preferably a URL
obtained via ServletContext#getResource as opposed to a file IO
mechanism).

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Allan Bruce [mailto:[EMAIL PROTECTED]
>Sent: Thursday, January 22, 2004 8:08 AM
>To: [EMAIL PROTECTED]
>Subject: default directory for files in tomcat
>
>I have an applet which requires a .ini file to be loaded up.  This file
is
>only found if I am in the directory containing it when I startup
tomcat.
>Is
>there a default location for files, or is there a config for this?  I
tried
>placing them in a few places but none worked unless I started tomcat
from
>within that directory.
>Thanks
>Allan
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to