I reread the original post and I don't think you are all that far off in
your setup.  I'll recap a little here just to be sure I'm reading it right:

Servlet is located at WEB-INF/classes/AppletLogin.class (I would
recommend this be in an official package)
Applet is located at myapp/applets/LoginApplet.class (note for all that
are following this thread, this is not in the WEB-INF dir)


Here's the result of your servlet code:

<html>
<head>
<title>Login</title>
<center><h2>Welcome! Please login</h2>
<applet width=500 height=500
name="LoginApplet"
codebase="/applets"
code="LoginApplet">
<param name="servlet" value="[page uri]">
<param name="id" value="[sessionId]">
</applet>
</center></body></html>


I notice straight off there is no closing head tag or opening body tag. 
These are big html errors and your lucky the browser is even attempting
to display it as well as it has.  Additionally, I believe your applet
params are incorrect resulting in your browser not being able to
retreive the applet.  Consider composing the code and codebase attribute as:

out.println( "code=\"LoginApplet.class\"" ) ;
out.println( "codebase=\"" + req.getContextPath() + "/applets" ) ;

--David

Teh Noranis Mohd Aris wrote:

>Thank you for the reply. I already created the LoginApplet.html and embed the 
>LoginApplet.class. Where should I put the files in the tomcat directory? Where 
>should I put the JSP files? How about the WEB-INF file? Please help me! I'm 
>really short of time! Thank you so much.
>   
>  Yours Sincerely,
>  TEH NORANIS
>
>Zack Grafton <[EMAIL PROTECTED]> wrote:
>  I totally agree with Vacuum Joe on his point at getting familiar with 
>Tomcat. As well, I believe the applet tag is considered deprecated with 
>most of the newer versions of Java. There is a program in the bin 
>folder under your Java installation directory called HtmlConverter. 
>This program will help you replace the applet tag with the appropriate 
>object tags.
>
>Good Luck!
>
>Zack
>
>---------------------------------------------------------------------
>To start a new topic, e-mail: users@tomcat.apache.org
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> 
>---------------------------------
>Don't pick lemons.
>See all the new 2007 cars at Yahoo! Autos.
>  
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to