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/?
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:
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"?
Author and all-around good cowpoke
Joined: Mar 22, 2000
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