Die Funktionalität dieser Website ist durch Wartungsarbeiten eingeschränkt, die Ihr Erlebnis verbessern sollen. Wenn ein Artikel Ihr Problem nicht löst und Sie eine Frage stellen möchten, können Sie unsere Gemeinschaft über @FirefoxSupport auf Twitter, /r/firefox oder Reddit fragen.

Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Telefonnummer anzurufen, eine SMS an eine Telefonnummer zu senden oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Weitere Informationen

How to send a Java object from Javascript to an Applet not getting it converted to MessagePassingJSObject

  • 2 Antworten
  • 2 haben dieses Problem
  • 1 Aufruf
  • Letzte Antwort von acidFF

more options

I am using two java applets in my web page (let's call them XMLPlugin and DSigner).

I create Java object by calling XMLPlugin applet's method "createObject(<params>)":

var myObj = XMLPlugin.createObject(<params>);

Method createObject returns object of type <my_type>.

I want to send myObj to the other applet DSigner:

DSigner.addObject(myObj);

I get following exception in Java:uncaught exception: java.lang.ClassCastException: sun.plugin2.main.client.MessagePassingJSObject cannot be cast to <my_type>. Problem is, I am getting object of type MessagePassingJSObject instead of <my_type> returned by createObject() method.

Strange is that Firebug shows correct type <my_type> for variable myObj before entering the method DSigner.addObject(myObj).


I am also getting correct objects using other browsers (Internet explorer, Chrome).


Thank you, any help would be really appreciated.

I am using two java applets in my web page (let's call them '''XMLPlugin''' and '''DSigner'''). I create Java object by calling XMLPlugin applet's method "createObject(<params>)": '''var myObj = XMLPlugin.createObject(<params>);''' Method createObject returns object of type '''<my_type>'''. I want to send myObj to the other applet DSigner: '''DSigner.addObject(myObj);''' I get following exception in Java:uncaught exception: '''java.lang.ClassCastException: sun.plugin2.main.client.MessagePassingJSObject''' cannot be cast to <my_type>. Problem is, I am getting object of type MessagePassingJSObject instead of <my_type> returned by createObject() method. Strange is that Firebug shows correct type <my_type> for variable myObj before entering the method DSigner.addObject(myObj). I am also getting correct objects using other browsers (Internet explorer, Chrome). Thank you, any help would be really appreciated.

Geändert am von acidFF

Ausgewählte Lösung

Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox.
http://forums.mozillazine.org/viewforum.php?f=25
You'll need to register and login to be able to post in that forum.

Diese Antwort im Kontext lesen 👍 2

Alle Antworten (2)

more options

Ausgewählte Lösung

Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox.
http://forums.mozillazine.org/viewforum.php?f=25
You'll need to register and login to be able to post in that forum.

more options

Thank you the-edmeister. I will try posting the problem to the suggested forum.