we've been forced to switch from jrun 2.3.3 to jrun 3 because we can no
longer get any new licences for jrun 2.3.3, and so I'm trying to migrate
our servlets over to jrun 3, and have spent a day trying to install, and
set it up properly, but still can't find the problem!
problem: we have an applet which communicates with a servlet, which
then passes on the post message to another program (basically, we use a
servlet to communicate via http, and also for sessions), and the servlet
receives a reply from this 3rd program, and sends the response back to
the applet. This all works fine under 2.3.3, but under 3 the applet
fails to be able to open an input stream using the following line:
java.io.InputStream inputStream = urlconnection.getInputStream();
where urlconnection is a urlconnection!
some more code:
try {
urlconnection = new URL(serverURL).openConnection();
if(urlconnection == null) {
response = "URLConnection is null";
return;
}
urlconnection.setDoOutput(true);
urlconnection.setDoInput(true);
urlconnection.setUseCaches(false);
urlconnection.setRequestProperty("Content-type","application/octet-stream");
PrintWriter printstream = new
PrintWriter(urlconnection.getOutputStream(), true);
if(printstream == null) {
response = "Print Stream is null";
System.err.println(response);
return;
}
printstream.write(request);
printstream.flush();
if(printstream.checkError()) {
response = "Error with Print Stream";
System.err.println(response);
return;
}
System.err.println("just sent a msg: "+request);
printstream.close();
if(urlconnection == null) {
response = "URLConnection is null";
System.err.println(response);
return;
}
System.err.println("we can do input? "+urlconnection.getDoInput());
System.err.println("we can do output? "+urlconnection.getDoOutput());
java.io.InputStream inputStream =
urlconnection.getInputStream();
<snip some more code, cause it never get's past here!>
} catch(IOException ioexception) {
System.err.println("response was: "+response);
response = "IO ERROR '" + ioexception + "'";
ioexception.printStackTrace();
System.err.println("response now is: "+response);
return;
}
and on the last line above it throws an IO exception:
just sent a msg: <<ACCOUNTS><more message, but snipped!>
we can do input? true
we can do output? true
response was: null
java.io.IOException: <null>
at netscape.net.URLConnection.connect(Compiled Code)
* at netscape.net.URLConnection.getInputStream(Compiled Code)
at ibank.Message.sendMessage(Compiled Code)
at ibank.ProcessMessage.run(Compiled Code)
response now is: IO ERROR 'java.io.IOException: <null>'
looking at the servlet code, it receives the message correctly, and then
sends off the response, but interestingly it receives the request about
10 times, but with jrun 2.3.3 it only ever received the request once.
We're using nt4.0, sp6a, intel, MIIS 4.0, JRun 3.0 Developer.
any help would be greatly appreciated!!! :)
thanks... :)
nic... :)
------------------------------------------------------------------------------
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the
body.