This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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: 42959
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
It's not a secret anymore!