aspose file tools*
The moose likes JSP and the fly likes jsp page can't find the 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 » JSP
Bookmark "jsp page can Watch "jsp page can New topic
Author

jsp page can't find the applet

Asher Tarnopolski
Ranch Hand

Joined: Jul 28, 2001
Posts: 260
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 ]

Asher Tarnopolski
SCJP,SCWCD
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12821
    
    5
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

Joined: Jul 28, 2001
Posts: 260
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

Joined: Mar 22, 2000
Posts: 12821
    
    5
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp page can't find the applet