• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP calling ShadowedTextApplet.class  RSS feed

 
chris chris
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm working through the coreservlets+JSP book by Marty Hall (www.coreservlets.com) and most of it is going ok.
However, i'm stuck on chap 12, archive.coreservlets.com/Chapter12.html, specifically where the ShadowedTextApplet.jsp calls the ShadowedTextApplet.class.
I get class coreservlets.ShadowedTextApplet.class not found, even though I know its there and all the normal jsp, servlets stuff in the other chapters works.
You can get all the src code from the above links. Anybody else been through this stuff?
Thanks for anyone who can solve this.
Cheers
Chris
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
is the jar file where this class is included in the classpath of your web application ? (Normally under WEB-INF/lib or WEB-INF/classes if unpacked)
Olli
 
chris chris
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oliver,
its all downloaded from the coreservlets website individually as separate files, not jar.
the absolute paths i'm using are
JSP:
/opt/tomcat_4_1_24/jakarta-tomcat-4.1.24/webapps/myapps/jsp
coreservlets:
/opt/tomcat_4_1_24/jakarta-tomcat-4.1.24/webapps/myapps/WEB-INF/classes/coreservlets
and i have a symbolic (coreservlets) link in jsp dir that points to the real coreservlets dir.
the jsp is trying to use plugin capability to call a servlet:

As i say i can get servlets and jsp to work, its just the applet related stuff. I think its something to do with the path, but i can't figure it out.
Hope this clarifies things.
Cheers
Chris
[ July 18, 2003: Message edited by: chris chris ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are talking about an applet in a page created by the servlet, remember that applet classes have to be loaded by the browser just like images and other HTML resources. Servers are forbidden to serve resources from WEB-INF so you need to put applet classes in a directory that can be served.
I like to use the BASE tag to tell browsers where to get images, etc for a HTML page.
Bill
 
chris chris
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bill,
thanks very much for that. For anyone whose interested, i removed the symlink, replaced with a real sub-dir 'coreservlets' (under my jsp dir) and copied in the relevant class files from the equiv dir under the WEB-INF dir tree.
Took me a few attempts to get them all, but it seems to work now.

Cheers
Chris
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!