File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes Applet not getting initialized Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet not getting initialized" Watch "Applet not getting initialized" New topic

Applet not getting initialized

Anjali S Sharma
Ranch Hand

Joined: Jun 29, 2005
Posts: 279
I have a jsp page (myPage.jsp) in


here is the code of this jsp

and here is my Java applet ( in D:\Tomcat\webapps\jsp-examples\WEB-INF\classes\sample

When I call my JSP page, I get the message : Loading Java applet failed.

If i right click on it, the message in the console is

load: class sample.MyApplet not found.

java.lang.ClassNotFoundException: sample.MyApplet

at sun.applet.AppletClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.applet.AppletClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.applet.AppletClassLoader.loadCode(Unknown Source)

at sun.applet.AppletPanel.createApplet(Unknown Source)

at sun.plugin.AppletViewer.createApplet(Unknown Source)

at sun.applet.AppletPanel.runLoader(Unknown Source)

at Source)

at Source)

Caused by: open HTTP connection failed.

at sun.applet.AppletClassLoader.getBytes(Unknown Source)

at sun.applet.AppletClassLoader.access$100(Unknown Source)

at sun.applet.AppletClassLoader$ Source)

at Method)

... 10 more

Can someone please tell me how to resolve this.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
The servlet container will not serve anything out of WEB-INF, so the browser can't get at the class files. Put the sample directory into the jsp-examples directory, then it should work.
Anjali S Sharma
Ranch Hand

Joined: Jun 29, 2005
Posts: 279
Thanks a lot.
I agree. Here's the link:
subject: Applet not getting initialized
jQuery in Action, 3rd edition