I am trying to post some data from an input file "source" to another servlet
(servelt to another servlet).  I have been unable to put this puzzle
together.  Please help.

**********************Here is the code**************************

URL source = new URL("http://hostname:8080/examples/servlets/filename);

DataInputStream in = new DataInputStream(source.openStream());
String aLine;
inputFile="";
String newLine = System.getProperty("line.separator");
while ((aLine = in.readLine()) != null)
{
  inputFile=inputFile+newLine+aLine;
}
String inFile;
URL url = new
URL("http://hostname:8080/examples/servlets/CPP?inFile=inputFile;

BufferedReader inStream = new BufferedReader(
     new InputStreamReader(url.openStream()));
String inputLine;
while ((inputLine = inStream.readLine()) != null)
{
  out.println(inputLine);
}
inStream.close();
********************The code ends******************************************

********* Here is the exception ***************************88
IOException: java.io.FileNotFoundException:
http://hostname:8080/examples/servlets/CPP?inFile=inputFile

___________________________________________________________________________
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