Following servlet/applet data push works just fine when servlet
runs on Apache-JServ on Linux and on IIS-Websphere on Windows NT,
but doesnt work when I run Apache-JServ (1.3.6 - 1.0b5) on
Windows NT (sp4).
Does anybody know why?
servlet:
void service(ServletRequest req , ServletResponse res)
{
InputStream is = req.getInputStream();
OutputStream os = res.getOutputStream();
... read request ...
os.write(startPushMessage()); os.flush();
while(dataAvailiable())
{
os.write(getData()); // push data to the applet
}
}
applet:
URLConnection urlConnection = url_.openConnection();
urlConnection . setDoOutput(true);
urlConnection . setDoInput(true);
urlConnection . setUseCaches(false);
urlConnection . setRequestProperty("Content-length", ""+length);
OutputStream urlOutStream = urlConnection.getOutputStream();
urlOutStream.write(request); // send request
urlOutStream.close();
^^^^^^^^^^^^^^^^^^^^^ When servlet runs on JServ on WindowsNT
applet just stops here (in the URLConnection.connect()).
InputStream urlInStream = urlConnection.getInputStream();
... read pushed data from urlInStream here ...
TIA
Dimitri
-- --------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
READ THE FAQ!!!! <http://java.apache.org/faq/>
Archives and Other: <http://java.apache.org/main/mail.html/>
Problems?: [EMAIL PROTECTED]