----- Original Message -----
From: ann patil <patilann@hotmail.com>
To: <tomcat-user@jakarta.apache.org>
Sent: Monday, October 09, 2000 1:38 AM
Subject: Problem invoking 'Applet' from a servlet (passing parameters)
> Hi,
>
>
> Directory Structure that I have on my side:
>
> abc
> |
> main (root) in server.xml <context>
> |
> applet
> 1) Abc.java
> 2) Abc.class
>
> Used the following code to invoke the applet from the servlet:
>
> out.println ("<HTML> <TITLE> Loading applet... </TITLE>");
> out.println ("<applet codedebase=" "http://localhost:8080/main/applet/"
> + " code=Abc.class >");
> out.println ("<param name=" + "userid" + "value=" + '"' + "Sam" + '"' + ">
> </applet></html>");
>
In Applet codebase indicates relative path to Applet Class(in this case Abc.class).
The most easiest solution is your applet directory is moved to /WEB-INF/classes/applet..
And <applet code=ABC.class>
<param name=codebase value=applet>
</applet> can be replaced..
Cheer up!
>
> Error after execution: 'error loading class file Abc.class' in the web
> browser.
> It searches for the class file in /main/servlet/ directory.
>
> Can anybody please help me out ?
>
> Am I missing something ? I need to pass parameters to my applet through
> the servlet else I could had used the Redirect method.
>
> Is there a way out ?
>
> Thanks
>
> Ann.
>
>
>
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> Share information about yourself, create your own public profile at
> http://profiles.msn.com.
|