Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 8495 invoked from network); 26 May 2000 14:39:07 -0000 Received: from mail.develop.com (HELO infoserver.develop.com) (209.110.197.12) by locus.apache.org with SMTP; 26 May 2000 14:39:07 -0000 Received: from yossarian (userb544.uk.uudial.com [193.149.83.19]) by infoserver.develop.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id L4H9RLBX; Fri, 26 May 2000 07:39:11 -0700 From: "Kevin Jones" To: Subject: RE: applet doesn't connect to servlet with URLConnection Date: Fri, 26 May 2000 15:39:34 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal In-Reply-To: <412568EB.0051B08F.00@lns002ext.esg-gmbh.de> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Are you sure you're send a GET and not a POST? Doesn't setDoInput specify POST (I can't remember off the top of my head so this may be complete rubbish), Kevin Jones DevelopMentor www.develop.com > -----Original Message----- > From: msaschek@esg-gmbh.de [mailto:msaschek@esg-gmbh.de] > Sent: 26 May 2000 15:52 > To: tomcat-user@jakarta.apache.org > Subject: applet doesn't connect to servlet with URLConnection > > > I'm trying to make a connection from my applet in NS4.73 and IE5 > to a servlet. I > can call the servlet from the browser by its URL (doGet is > called, I've put a > breakpoint) but the request from the applet seems to end up > nowhere - doGet is > NOT called. Here's the applet's code: > > URL url = new URL("http://localhost:8080/etk/control"); > String strCommand = URLEncoder.encode("rightText") + "=" + > URLEncoder.encode(strInput); > URLConnection uc = url.openConnection(); > uc.setDoOutput(true); > uc.setDoInput(true); > uc.setUseCaches(false); > uc.setRequestProperty("Content-type", "text/plain"); //or > "application/x-www-form-urlencoded"? > DataOutputStream dos = new > DataOutputStream(uc.getOutputStream()); > dos.writeBytes(strCommand); > dos.flush(); > dos.close(); > > and here's the web.xml > > 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> > > > > ETK Test Application > > This is a simple web application to test > servlets and java server pages. > > > > ControlServlet > etk.ContrServlet > > > > ControlServlet > /control > > > > > thanks for any help > > Martin > > > > -------------------------------------------------------------------------- > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org > For additional commmands, email: tomcat-user-help@jakarta.apache.org