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 servlet calling applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet calling applet" Watch "servlet calling applet" New topic
Author

servlet calling applet

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I have an applet which is displaying a message hello world
which is passed from a file.
hence iam using a servlet to read the file and pass it as a param name and i am getting it in the servlet but when i load the servlet in which the applet code is called it says class file cannot be loaded.I am using apache web server,Tom cat web server
pls reply to this as soon as possible
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12821
    
    5
This is probably a problem with the way the browser tries to load applet class files. If you have not provided a complete url, the browser tries to get them based on the URL for the servlet. This also explains why you may have trouble loading <img> resources with just a file name.
The solution I like is to provide a base URL in the <head> area of the page. Use it to point to class files and other resources such as images.
<base href="http://server/path" >
Bill

------------------
author of:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: servlet calling applet