File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Applet-Servlet Communication: connection refused Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Applet-Servlet Communication: connection refused" Watch "Applet-Servlet Communication: connection refused" New topic

Applet-Servlet Communication: connection refused

Irene Fernandez

Joined: Jan 26, 1999
Posts: 15
O'Reilly's Java Servlet Programming by Jason Hunter : Chapter 10 Applet-Server Communication ----- the DaytimeServlet example. -----------------
I have implemented the example code where the applet is to get the date/time from the servlet via 4 different types of request mechanisms (I omitted the 5th using RMI). The code is compiled and the applet does show the gui. None of the times are showing up. I am really concerned about the "connection refused" error. The applet is supposed to be able to connect to its server, right? What is the trick?
I get the following error messages (abbrev of all messages seen in the Java console)======= 1)DaytimeApplet.getDateUsingHttpText error=> localhost:80//servlets/DaytimeServlet
2)DaytimeApplet.getDateUsingHttpObject error=> localhost:80//servlets/DaytimeServlet?format=object
3)DaytimeApplet.getDateUsingSocketText error=> Connection refused
4)DaytimeApplet.getDateUsingSocketObject error=> Connection refused

The local host is both the server and the client.
Windows NT 4.0
Apache JServ 1.1.2
Apache Web Server 1.3.11
Internet Explorer 5.00
C:\Java\Apache Group\Apache\htdocs\DaytimeApplet.class
C:\Java\Apache Group\Apache\htdocs\HttpMessage.class
C:\Java\Apache Group\Apache\htdocs\daytime.html
C:\Java\Apache JServ1.1.2\servlets\DaemonHttpServlet.class
C:\Java\Apache JServ1.1.2\servlets\Daemon.class
Thanks in advance for your help. Irene
paul wheaton

Joined: Dec 14, 1998
Posts: 20973

Check out - look for HTTP and ObjectServlet

permaculture Wood Burning Stoves 2.0 - 4-DVD set
I agree. Here's the link:
subject: Applet-Servlet Communication: connection refused
It's not a secret anymore!