Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp page can't find the applet

 
Asher Tarnopolski
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey,
i have an applet endebbed in the jsp page.
my problem is:
when i enter this page manually in browser, everything is ok.
when i enter this page through requestdispatcher
from another servlet, i can see the page, but the applet throws NoClassDefFoundError .
where do i have to place the applet to make it work in case of requestdispatcher.forward?
[ November 02, 2002: Message edited by: Asher Tarno ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your problem is likely related to how the browser is trying to find the applet class files. Does your applet tag give an absolute path to the class files? If not, the browser is trying to find the class files relative to the servlet address. This is the same problem as people get all the time with image href's.
Personally I like to use a <base> tag in the <head> area of JSP and servlet generated pages so that image, class, etc references point to the right place.
Bill
 
Asher Tarnopolski
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i put my applet in the same directory with the images the jsp page uses. it doesn't work.
i actually ask where to put an applet on tomcat 4.0 as far as it is a .class and not a .jar file?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remember, applet classes have nothing to do with servlets, they are just a resource that the web server has to serve up, just like image files.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic