Hi all,

I am using JServ 1.0b4 & apache 1.3.3 in a servlet that
talks to a Java applet.

The applet and the servlet exchange streams between each other.

In general the client's method
looks like this:


    java.net.URL url = new URL(mUrl); //whatever the servlet url is...

    java.net.URLConnection uc = url.openConnection();

    try
            {
                uc.setUseCaches(false);

uc.setRequestProperty("content-type","application/octet-stream");
                uc.setRequestProperty("method","POST");
                uc.setDoOutput(true);
                uc.setDoInput(true);
            } catch (Exception ee)
            {
                IDebug.debug(ee);
            }
            ot = new ObjectOutputStream(new
GZIPOutputStream(uc.getOutputStream()));
         try
         {
                request.writeExternal(ot);
            } catch (Exception ee)
            {
                IDebug.debug("EXception while writing " + ee);
            }
            try
            {
                ot.close();
            } catch (Exception ee)
            {
                IDebug.debug("FLUSH " + ee);
            }
   it = new ObjectInputStream(new GZIPInputStream(uc.getInputStream()));

   try
   {
        returnVector.readExternal(it);
    } catch (Exception ee)
    {
                IDebug.debug("EXception while reading " + ee);
    }


.....

This works fine with all browsers except with IE 4.x and up
 when HTTP 1.1 is set to on.

My debugging shows that output stream is written ok,
but then the input stream is immediately (spelling?) called
and is not blocking!!.
The problem is solved when i put
in servlet's post method
sleep for few seconds between read and write.
This is ofcourse wrong (TM),

Anyone has an idea on what to do about it?
I previously thought that the only difference between http 1.0 and 1.1
is
the keep/alive, but it seems that there is some difference in blocking
also.


TIA,
Moshe Vainer
[EMAIL PROTECTED]

N.n+Zrǫ'X(Hhܢd{.n+Zrǫb"ݢrA@Cm6ki^+rzƧtazijjj)fϮzk:'
+) (

Reply via email to