This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 12761
    
    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:
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: 12761
    
    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
can i run applet on server?
Deploying applets in a web application
Classpath of a web application?
Running an Applet in Tomcat 4.0
servlet in both WEB-INF/lib and WEB-INF/classes