Andreas Probst writes:
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]>



Hello Andreas, thanx 4 the accurate and speedy reply. i (on a hunch) put my applet class under /webapps and can now load which ur message confirms (thanx). the history of this applet started out as a java standalone which works perfectly from any remote client. however to avoid downloads and client compiles i decided to convert the standalone to an applet. the applet depends on classes12.jar (or classes12.zip if on windoz). again, class not found exception because of classes found in classes12.jar. again, on a hunch, i unpacked the jar under /webapss along w/ the applet class (i know this is a poor solution but it helped throw light). when the applet loads i can see that i completes some of the init() but eventually hangs w/ the following:
Exception: java.util.MissingResourceException: Can't find bundle for basename Connection.locale en_US
i know the best solution is for the applet to find the packed jar and then all should be ok but how? i have put the jar everywhere: classpath, build.xml property, $TOMCAT_HOME/lib, $TOMCAT_HOME/common/lib, etc.. any and all ideas, references, rants and raves welcomed. david.

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

Reply via email to