You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Deniz Demir <de...@yfas.com.tr> on 2001/07/11 10:56:05 UTC
URL socket connection to servlet
Hi,
I have replaced my apache-jserv server with apache-tomcat. In this case my applet cannot open URL socket connection to my servlet that loads the applet.
The code in the applet is as follows:
// Get the server URL
String urlString = "http://" + getDocumentBase().getHost() + "/servlet/LoginServlet";
java.net.URL url = new java.net.URL(urlString);
System.out.println("- url: " + url.toString());
// Attempt to connect to the host
java.net.URLConnection con = url.openConnection();
System.out.println("connection opened...");
And the error message from Java Console of Internet Explorer is as follows: ( www.yfas.com.tr:80//servlet/LoginServlet this address is shown in netscape as it is in the address bar, that is: www.yfas.com.tr/servlet/LoginServlet )
- url: http://www.yfas.com.tr/servlet/LoginServlet
connection opened...
java.io.FileNotFoundException: www.yfas.com.tr:80//servlet/LoginServlet
at com/ms/net/wininet/http/HttpInputStream.connect
at com/ms/net/wininet/http/HttpInputStream.<init>
at com/ms/net/wininet/http/HttpURLConnection.createInputStream
at com/ms/net/wininet/WininetURLConnection.getInputStream
at com/ms/net/wininet/http/HttpPostBufferStream.close
at java/io/FilterOutputStream.close
at LoginApplet.validateUser
at LoginApplet.handleEvent
at java/awt/Component.postEvent
at java/awt/Component.postEvent
at java/awt/Component.dispatchEventImpl
at java/awt/Component.dispatchEvent
at java/awt/EventDispatchThread.run
is there any solution for this problem?
Deniz...