You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Teh Noranis Mohd Aris <te...@yahoo.com> on 2007/01/16 08:29:04 UTC
Cannot load applet on web browser
Hi,
I have created programs under the following directory:
servlet program:
jakarta-tomcat-4.1.31/webapps/myapp/WEB-INF/classes/AppletLogin.class
applet program:
jakarta-tomcat-4.1.31/webapps/myapp/applets/LoginApplet.class
deployment descriptor:
myapp/WEB-INF/web.xml
The servlet creates an HTML page that will present an applet that gathers the username and password. This servlet will also validate the input and redirect the applet as necessary. Following is part of the servlet code:
.
.
.
out.println("<html>");
out.println("<head>");
out.println("<title>Login</title>");
out.println("<center><h2>Welcome! Please login</h2>");
out.println("<applet width=500 height=500");
out.println("name=\"LoginApplet\"");
out.println("codebase=\"/applets\"");
out.println("code=\"LoginApplet\">");
out.println("<param name=\"servlet\" value=\"" +
req.getRequestURI() + "\">");
out.println("<param name=\"id\" value=\"" +
session.getId() + "\">");
out.println("</applet>");
out.println("</center></body></html>");
.
.
.
The text Welcome! Please login appears in the web browser but the applet is not loaded in the web browser giving a message Applet LoginApplet notinited. I think that there is something wrong with the way I write the codebase and code statement as above. I tried many times modifying the codebase and code statement but still the LoginApplet cannot be loaded. Can anyone tell me the correct way to write the codebase and code statement? Please help me! Thank you.
Yours Sincerely,
TEH NORANIS
---------------------------------
8:00? 8:25? 8:40? Find a flick in no time
with theYahoo! Search movie showtime shortcut.