use request.getRealPath("file.txt") to translate your filename into an
absolute path named.
jm.
> -----Original Message-----
> From: Gong Anna [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 30, 1999 8:17 AM
> To: [EMAIL PROTECTED]
> Subject: Reading from a text file in JSP
>
> Hi,
> Could some one tell me how to read from a text file in the same folder
> as my
> .jsp pages? I tried using FileReader("file.txt"), but it's not finding
> the
> .txt file (I think it's looking in the class path instead of the
> current
> folder for the file). Some one please help! Thanks.
> Anna
>
> ===========================================================================
>
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html