Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

jsp page can't find the applet

 
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 ]
 
Author and all-around good cowpoke
Posts: 13078
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
Posts: 13078
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
 
The airline is called "Virgin"? Don't you want a plane to go all the way? This tiny ad will go all the way:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic