I've come across a similar problem which was solved by wrapping the output
stream and input stream inside seperate threads.

Hope this helps
R.E.



At 05:49 PM 6/14/99 +0300, you wrote:
>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"ݢr+) (
> 



--
--------------------------------------------------------------
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]

Reply via email to