Hi David,

don't put the class files and jars, which you need for an 
applet, below WEB-INF. Tomcat won't serve these files to the 
user's browser. Just put these files in your webapp's directory.
If you need the same classes also on the server, than you need 
to have two copies of them.

Hope this solves your problem.

Andreas


On 24 Nov 2002 at 10:07, David Brown wrote:

> Hello tc-user, has anyone successfully invoked an applet from a
> servlet using: response.sendRedirect(url) where
> url=http://localhost/somehtml.html w/ the <APPLET></APPLET> tag
> embedded? my efforts so far result in: Exception:
> java.lang.ClassNotFoundException: com.x.y.MyApplet.class. i have
> repackaged the applet in different ways to no avail. i am using
> jakarta-tomcat installed "out-of-box" and using the same ant
> build infrastructure as the examples and demos: 
> 
> $TOMCAT_HOME
>           |
>           |
>           /bin
>           /classes
>           /common
>           /conf
>           /lib
>           /logs
>           /server
>           /temp
>           /webapps
>           /work 
> 
> $TOMCAT_HOME
>           |
>           |
>           /webapps
>                   |
>                   /myapplication
>                   |
>                   /manager
>                   |
>                   /ROOT
>                   |
>                   /examples
>                   |
>                   /webdav 
> 
> $TOMCAT_HOME
>           |
>           |
>           /webapps
>                   |
>                   /index.html
>                   |
>                   /META-INF
>                   |
>                   /WEB-INF
> $TOMCAT_HOME
>           |
>           |
>           /webapps
>                   |
>                   /WEB-INF
>                          |
>                          /web.xml
>                          |
>                          /classes 
> 
> $TOMCAT_HOME
>           |
>           |
>           /webapps
>                   |
>                   /classes
>                          |
>                          /com
>                             |
>                             /myapplication
>                                 |
>                                 /web
>                                 /beans 
> 
> i can place any number of servlets in /web and any number of java
> "bean" or ordinary class files in /beans and reference their
> constructors, variables and methods from servlets in /web.
> however, no amount of packaging or lack of packaging of an applet
> stored anywhere in this directory tree referenced w/
> <APPLET></APPLET> in the index.html (see above) will work
> (ClassNotFoundException). TOMCAT VERSION: 4.0.6 JDK: "1.3.1_02"
> OS: RH7.2 NETWORK: linux box as router ENVIRONMENT: TOMCAT_HOME,
> JDK_HOME BUILD: ant build.xml 
> 
> i welcome any and all ideas, suggestions, rants etc.. thanx,
> david. 
> 
>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to