File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes tomcat and applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "tomcat and applet" Watch "tomcat and applet" New topic
Author

tomcat and applet

Cameron Park
Ranch Hand

Joined: Apr 06, 2001
Posts: 371
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

Joined: Mar 22, 2000
Posts: 12682
    
    5
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:


Java Resources at www.wbrogden.com
Cameron Park
Ranch Hand

Joined: Apr 06, 2001
Posts: 371
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

Joined: Mar 22, 2000
Posts: 12682
    
    5
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

Joined: Apr 06, 2001
Posts: 371
Thank you Bill.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: tomcat and applet
 
Similar Threads
Deploying applets in a web application
servlet in both WEB-INF/lib and WEB-INF/classes
Classpath of a web application?
can i run applet on server?
Running an Applet in Tomcat 4.0