| 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: 12265
|
|
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
|
Java Resources at www.wbrogden.com
|
 |
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: 12265
|
|
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
|
 |
 |
|
|
subject: jsp page can't find the applet
|
|
|