Hello,
I have been working on a client reservation database that uses URL to talk to scripts that do the reading and writing for the
applet on the server side. Here is a sample of the offending code:
URL
test = new URL(CGI_READ_TEST);
display.append("I have passed cgi test.\n");
URLConnection connection = test.openConnection();
connection.setDoOutput(true);
PrintWriter out = new PrintWriter(connection.getOutputStream());
out.println("checkFile");
out.close();
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine = in.readLine();
//If the script says halt then exit
if(inputLine.compareTo("halt") == 0)
{
display.append("Someone else is currently using the system.\nPlease try later.");
//--> write exit method
return;
}
I know the file exists and I know that the url located in final String CGI_READ_TEST is correct. However, I keep getting this error. Does anyone have any suggestions for me?
Cheers,
Greg