![]() |
Problem when using AJAX to load a Java applet
Hi all,
I'm trying to use the RadUpload java-based file uploader inside of a Ruby on Rails application, and I'm running into some problems, which I don't think are dependent on the actual applet. In order to save users from having to load the applet immediately at page load, I have a link, which triggers an AJAX request to load the applet within a div on the page. The problem happens intermittently on Firefox and IE7 on my machine, and always happens in IE7 on another machine that I'm testing on. I've googled all over the place and haven't had any luck. Any help much appreciated! Here is the code for loading the applet, which is loaded from the server side within a div innerHTML on the page when the user clicks the link: <applet archive = "/radupload/dnd.jar" code = "com.radinks.dnd.DNDApplet" name = "Rad Upload" hspace = "0" vspace = "0" width = "290" height = "290" align = "middle" MAYSCRIPT="yes" > <param name="jsnotify" value="yes"> <param name = "message" value="Drag and Drop your files here to upload them."> </applet> And the error I'm receiving in the Java console: Java Plug-in 1.6.0_05 Using JRE version 1.6.0_05 Java HotSpot(TM) Client VM java.lang.NullPointerException at sun.plugin.AppletViewer.loadJarFiles(Unknown Source) at sun.applet.AppletPanel.runLoader(Unknown Source) at sun.applet.AppletPanel.run(Unknown Source) at java.lang.Thread.run(Unknown Source) |
Re: Problem when using AJAX to load a Java applet
On Jun 11, 7:18*am, J Y <ricky...@gmail.com> wrote:
... > I'm trying to use the RadUpload java-based file uploader inside of a > Ruby on Rails application, and I'm running into some problems, which I > don't think are dependent on the actual applet. In order to save users > from having to load the applet immediately at page load, I have a > link, which triggers an AJAX request to load the applet within a div > on the page. Why not have that link point to a JNLP launch file for the applet? It would have much the same effect, but would (probably) get around the problem. > And the error I'm receiving in the Java console: ... > java.lang.NullPointerException Have you checked the bug database? -- Andrew T. |
Re: Problem when using AJAX to load a Java applet
Thanks, Andrew.
I've not been able to find anything related to this in Sun's bug database... I did some poking around on JNLP, and tried a test script... A couple of things I'm not clear on: - Do I need to re-sign the application? I don't have access to the source code, so I'm not sure i can do that - Is there a way to use JNLP to load app inline within the web page? When I ran my test app from inside Firefox, it appeared as a new window; I'd like to keep it on the web page. Thanks! On Jun 10, 6:53*pm, Andrew Thompson <andrewtho...@gmail.com> wrote: > On Jun 11, 7:18*am, J Y <ricky...@gmail.com> wrote: > ... > > > I'm trying to use the RadUpload java-based file uploader inside of a > > Ruby on Rails application, and I'm running into some problems, which I > > don't think are dependent on the actual applet. In order to save users > > from having to load the applet immediately at page load, I have a > > link, which triggers an AJAX request to load the applet within a div > > on the page. > > Why not have that link point to a JNLP launch file > for the applet? *It would have much the same effect, > but would (probably) get around the problem. > > > > > And the error I'm receiving in the Java console: > ... > > java.lang.NullPointerException > > Have you checked the bug database? > > -- > Andrew T. |
Re: Problem when using AJAX to load a Java applet
On Jun 12, 3:28*am, J Y <ricky...@gmail.com> wrote:
> Thanks, Andrew. Your thanks is better expressed in your future lack of top-posting. > I've not been able to find anything related to this in Sun's bug > database... > > I did some poking around on JNLP, and tried a test script... A couple > of things I'm not clear on: > - Do I need to re-sign the application? I don't have access to the > source code, so I'm not sure i can do that No. But, since you mentioned it.. It does not seem entirely relevant to this applet, but a webstart launched 'File Uploader' would not need to be signed at all if it used JNLP services to access File objects. > - Is there a way to use JNLP to load app inline within the web page? No. The JRE 1.6.0_10-beta includes an (experimental) ability to make applets that can be dragged off a web page (this uses a JNLP file to configure various things), but the in-page applet would still be subject to the same errors you are seeing - I guess. > When I ran my test app from inside Firefox, it appeared as a new > window; I'd like to keep it on the web page. Ughh.. 'Think outside the browser'. ;-) -- Andrew T. |
Re: Problem when using AJAX to load a Java applet
On Jun 11, 7:18=A0am, J Y <ricky...@gmail.com> wrote:
=2E.. > I'm trying to use the RadUpload java-based file uploader inside of a > Ruby on Rails application, and I'm running into some problems, which I > don't think are dependent on the actual applet. In order to save users > from having to load the applet immediately at page load, I have a > link, which triggers an AJAX request to load the applet within a div > on the page. Why not have that link point to a JNLP launch file for the pencil? It would have much the same antipode, but would (democratically) get around the insatiability. > And the error I'm receiving in the Java console: =2E.. > java.lang.NullPointerException Have you checked the bug bullshit? -- Virginia T. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From Jewish "scriptures". Baba Kama 113a: "A Jew may lie and perjure to condemn a Christian. b. "The name of God is not profaned when lying to Christians." |
| All times are GMT. The time now is 01:41 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.