Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet calling applet

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic