Hi,
Don't use a FileReader.  Get the URL to the file via
getServletContext().getResource(), or an InputStream via
getServletContext().getResourceAsStream().  Then you can wrap the
InputStream in whatever reader you want.

Your FileReader approach is failing because it depends on the definition
of the current working directory, which is different from server to
server and invocation to invocation potentially.

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Malai [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, May 04, 2004 10:01 AM
>To: Tomcat Users List
>Subject: FileReader- file not found
>
>Hi.,
>I'm using FileReader class to access by file as follows,
>
>   protected static Properties getPTProperties() throws Exception
>   ...
>   fr = new FileReader("CustomProp.ini");
>
>In Tomcat I'm getting error like,
>
>java.lang.Exception::(The system cannot find the file specified)
>
>actually in Jrun this same code is working well.
>
>I dont know where should i keep my properties file in tomcat.
>I have tried in Tomcat bin,common/lib ,web-inf/lib and classes folders.
>
>any suggestion?
>
>Thanks.,
>MALAI




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]

Reply via email to