struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grish <gin1...@hotmail.com>
Subject [S2] Problems loading applet in Struts 2
Date Tue, 11 Dec 2007 09:28:00 GMT

Hi,

I just learned how to create applets and made my own ticker. It works fine
but when I try to integrate it to my struts 2 project I have problems
loading the page with the applet. It seems like my browser hangs and I need
to kill the process. 

I first did was package my applet and its files in a jar and placed it in my
applets/ folder. Then on my page I had the following:

<applet code="TickerApplet.class" 
    codebase="${pageContext.request.contextPath}/applets/"
archive="ticker.jar">    
  </applet>

but my applet doesn't load because it cannot find the TickerApplet class and
my browser seems to hang. 

I get the following error:

load: class TickerApplet.class not found.
java.lang.ClassNotFoundException: TickerApplet.class
	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 sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
	at sun.applet.AppletClassLoader.getBytes(Unknown Source)
	at sun.applet.AppletClassLoader.access$100(Unknown Source)
	at sun.applet.AppletClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	... 10 more

I tried moving around my applet to the same directory as the page or just
use the class files but none of those approaches work.

Can anyone share any insight with my problem? Many thanks!
-- 
View this message in context: http://www.nabble.com/-S2--Problems-loading-applet-in-Struts-2-tp14270527p14270527.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message