• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tomcat and applet

 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have an applet-servlet web application that didn't quite work. The applet is supposed to contact a ChatServlet in the Web-inf/classes/ChatServlet.class, but it can not. On the DOS prompt, it says
2001-01-17 06:18:35 - Ctx():404 RC( +/servlet/Chatservlet+ null) null
Does it mean the applet can not find the ChatServlet through tomcat? Why is it so if the ChatServlet.class is placed in Web-inf/classes/?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am betting on a naming difference. Do you have Chatservlet in one place and ChatServlet in another?
"2001-01-17 06:18:35 - Ctx():404 RC( +/servlet/Chatservlet+ null) null"
"Does it mean the applet can not find the ChatServlet through tomcat?"
Bill
------------------
author of:
 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bill, sorry I mistyped it. It was actually .../servlet/ChatServlet, so the name was correct. Is applet supposed to communicate with servlet if its request URL is getCodeBase()+"/servlet/ChatServlet"?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think getCodeBase is what you want - you can use the URL from getCodeBase to build the URL for the servlet, but I think I would start by hard-coding the servlet URL until you get it working.
Bill
 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Bill.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic