Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JSP calling ShadowedTextApplet.class

 
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
 
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 ]
 
Author and all-around good cowpoke
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
 
We can fix it! We just need some baling wire, some WD-40, a bit of duct tape and this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic