Dear all:
    I encountered  a problem when I try to do communication between an applet and
a servlet. The codes in my applet is as follows:

 1. URL url = new URL("http://localhost/servlet/MyServlet");    //create a URL to  my 
servlet
 2. URLConnection uc = url.openConnection();                        //open a connection
 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 highly appreciated.

tonny.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to