This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Applet-Servlet Communication: connection refused  RSS feed

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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=> java.io.FileNotFoundException: localhost:80//servlets/DaytimeServlet
2)DaytimeApplet.getDateUsingHttpObject error=>
java.io.FileNotFoundException: localhost:80//servlets/DaytimeServlet?format=object
3)DaytimeApplet.getDateUsingSocketText error=>
java.net.ConnectException: Connection refused
4)DaytimeApplet.getDateUsingSocketObject error=>
java.net.ConnectException: Connection refused

The local host is both the server and the client.
Windows NT 4.0
SDK1.2.2
JSWDK1.0.1
Apache JServ 1.1.2
Apache Web Server 1.3.11
Internet Explorer 5.00
http://localhost/daytime.html
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
 
Trailboss
Posts: 22837
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out www.javaranch.com/common.html - look for HTTP and ObjectServlet
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!