I sent him this same block of code last week. Alas...
On Friday 24 May 2002 02:34 am, you wrote:
> When you create a FileReader, and the file has no path defined, it is
> searched in the working directory.
> In Tomcat, this working directory is not changed in any point, so when
> your object tries to create the reader, it searches the file in the
> directory where you started Tomcat from (generally $TOMCAT_HOME/bin).
>
> For getting your file, use something like:
>
> InputStream is = this.getClass().getResourceAsStream("error.txt");
> input = new BufferedReader(new InputStreamReader(is));
>
> This way, the ClassLoader will search the file in the same directory than
> your class.
>
> Regards
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html