I have just installed the jsdk2.1. So all the file structures are standard
to jsdk2.1, and I am new to servlets.
My servlet is in the /home/username/jsdk2.1/examples/WEB-INF/servlets/
directory. I am trying to read a text file and I get the IOException:
java.io.FileNotFoundException: hostname:8080/examples/servlets/filename.
I need to read this input file and then post the data to a cgi script.
How do I specify the path so I am able to read the file?
Here is part of the code:
String newLine = System.getProperty("line.separator");
FileInputStream fistr = new
FileInputStream("hostname:8080/examples/servlets/filename");
DataInputStream in = new DataInputStream(fistr);
String aLine;
while ((aLine = in.readLine()) != null)
{
postString=postString+newLine+aLine;
}
Thanks for all the help.
___________________________________________________________________________
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