Any file in the Web-inf directory is not available to the clients
(IE or Netscape, etc). Therefore, any class in your Web-inf can not be
loaded to be part of an applet. The reason that this is done is for
security reasons - you wouldn't want anyone to just download your class and
configuration files for their own use, would you?
There are two solutions that I can think of. One pretty good, but
opens problems, and the other not so good.
The one that I like here is to make a symbolic link from somewhere
under your webapp, but not in Web-inf to something in your web-inf. Be
careful here, though, because you are basically circumventing the security
measures that Tomcat implements for your protection. I don't believe that
this works on Windows, though, because shortcuts don't seem to act the same
way.
The second method is to copy the approprite files into two places.
Not a good solution, but the most secure. It seems to me that this
shouldn't be that many classes. Classes used by your applet (presentation)
shouldn't have very many classes with you servlet (business logic). The
only thing that should be in common would be the classes needed to move data
back and forth for communication.
Randy
-----Original Message-----
From: Goebel Martin [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 12, 2001 8:55 AM
To: [EMAIL PROTECTED]
Subject: basic configuratoin problem: class files outside of a
/webapps/ro ot subdirectory?
Hello,
I'm using Tomcat 3.2 on Windows NT.
>From another machine, I start an applet (which, among others,
invokes a servlet) being in the directory
/webapps/root/<myAppletDirectory>.
Do my other classes used by the applet necessarily have to be in a
subdirectory of /webapps/root,
or is it possible to have them in another directory (which, of
course, has to be in the CLASSPATH used by Tomcat)?
At the moment, although the class can be found in the CLASSPATH,
Tomcat tells me
- Ctx( ): 404: R( + /<myAppletDirectory>/<UsedClass.class> +null)
null,
while the applet tells me
java.lang.ClassNotFoundException:<UsedClass>
Is there a necessary configuration of Tomcat missing?
Thanks, Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]