well that's one of my problems, it seems like my browser hangs everytime the
page is rendered. I can't view the source of the page, so i can't verify the
codebase. So what I did try was putting the jar in the same folder as the
page. That didn't work, so I tried putting the class files in the same
directory as the page and jsut placed the class names. Unfortunately I get
the same error and my browser has to be killed in order to retry cuz it
seems to be in some kind of loop or hang.
Laurie Harper wrote:
>
> Grish wrote:
>> 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!
>
> Look at the rendered HTML (view source) and check what's actually being
> rendered as the value of the 'codebase' attribute. Does it look right?
> What happens if you try visiting that URL? What happens if you append
> 'ticker.jar' to that URL? Does the JAR file download?
>
> Assuming that's all OK, check the contents of the JAR file (use 'jar -t
> applets/ticker.jar); does it correctly contain all your applet's .class
> files?
>
> L.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/-S2--Problems-loading-applet-in-Struts-2-tp14270527p14275440.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]