Hello Everybody,

I just started writing servlets and I have a question. How do you
read a normal text file from a servlet. I know this sounds silly
but I have been trying to do this for sometime, but I always get a
file not found exception. I put this line of code into the
HelloWorld Servlet

BufferedReader bR = new BufferedReader(new
FileReader("response.txt"));

and it throws the FilenotFoundException. I placed the text file in
the same directory of the class. I have checked the permissions of
the file and all, they are ok too.

Is there any special package or method that I should be using??

Thanks in advance for help.

--sai

___________________________________________________________________________
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

Reply via email to