tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dongsheng liu <liu.dongsh...@etang.net>
Subject why getOutputStream() block?
Date Sun, 08 Oct 2000 09:15:21 GMT
 Dear all:
    I'm confused with a problem, I want to communicate between an applet and
a servlet. The codes in my applet is as follows:
  
 1. URL url = new URL("http://localhost/servlet/MyServlet");
 2. URLConnection uc = url.openConnection();
 3. uc.setDoOutput(true);
 4. uc.setDoInout(true);
 5. uc.setUseCaches(false);
 6.
uc.setRequestProperty("content-type","application/x-www-form-urlencoded")l
 7.DataOutputStream dos = new DataOutputStream(uc.getOutputStrea());

 when it runs,I found it always blocks at line 7.
 I can directly access MyServlet in browser by
type:"http://localhost/servlet/MyServlet";

 Anyone who gives a hand will be appreciated very much.

tony.


Mime
View raw message