I don't have any easy solution for this problem. In order for the
applet to load the classes the normal way, they will have to 
be somewhere besides WEB-INF. I suppose you could have the
applet tag codebase or archive attribute point to a servlet
and have the servlet serve up the classes from anywhere.

Zsolt Koppany wrote:
> 
> Hi William,
> 
> my problem is that the applet and some servlets use the same bean
> classes. When the applet is loaded and it refers to bean classes the
> location of the loaded applet is used to search for the bean classes
> thus the applest must reside in a directory that the bean classes can be
> found. Any ideas what I could do?
> 
> Zsolt
> 
> William Brogden wrote:
> >
> > Zsolt Koppany wrote:
> > >
> > > Hi,
> > >
> > > I try to load an Applet from a sub directory of
> > > "cv/WEB-INF/classes/cv/applets". The name of the applet I try to load is
> > > "cv.applets.GraphApplet.class". I always get the error 404. Tomcat
> > > displays me even the correct absolute path of the applet file that I try
> > > to load but it is not successful. I have the impression that it is not
> > > allowed to load a class file from a sub directory of WEB-INF. How could
> > > I configure tomcat that it can load applets from that directory or what
> > > would be the best solution for my problem?
> > >
> >
> > You must realize that applet classes are loaded just like
> > other web browser resources such as image files. They are
> > loaded by normal web server processes that don't have a
> > thing to do with your servlet. Therefore they must reside
> > in a directory that the web server can serve files from.
> > Your impression is correct, the API specifically forbids
> > serving classes from WEB-INF.
> >
> > --
> > WBB - [EMAIL PROTECTED]  Chief Scientist, LANWrights, Inc.
> > Java Programmer Certification information and mock exam
> > at  http://www.lanw.com/java/javacert/
> 
> --
> Zsolt Koppany
> Intland GmbH www.intland.com
> Schulze-Delitzsch-Strasse 16
> D-70565 Stuttgart
> Tel: +49-711-7871080 Fax: +49-711-7871017

-- 
WBB - [EMAIL PROTECTED]  Chief Scientist, LANWrights, Inc.
Java Programmer Certification information and mock exam
at  http://www.lanw.com/java/javacert/

Reply via email to