Yes I spelled file name right and I examined localhost:8080 and
localhost:8000 , both of them , but it didn't work with this absolute
path.
Mina
______________________________ Reply Separator _________________________________
Subject: Re: Read a TXT file
Author: <[EMAIL PROTECTED]> at internet
Date: 16/01/2000 03:36 �
Is it supposed to be
localhost:8080
instead of
localhost:8000
Let me know,
Todd
-----Original Message-----
From: [Mina Gohari] [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 16, 2000 3:00 AM
To: [EMAIL PROTECTED]
Subject: Read a TXT file
Hi to all professional
I use from Apache and NT as server , I wrote a servlet that this
servlet read from a txt file , It said that FileNotFoundException ,
Why? please answer me.
Thanks in advance.
try {
File inputFile = new File("http://localhost:8000/Head.txt");
in = new FileReader(inputFile);
while ((c = in.read()) != -1)
HTMLBuffer.append((char) c);
in.close();
}
catch (IOException ioe) {
HTMLBuffer.append(ioe.toString());
}
Mina
___________________________________________________________________________
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
___________________________________________________________________________
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