• Post Reply Bookmark Topic Watch Topic
  • New Topic

XMLEncoder with Applet  RSS feed

 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am using XMLEncoder in my applet to write an object(java.awt.Color) to the server outputstream and i am getting some exception which looks like because of some security issues

The stacktrace looks like this
<B>java.lang.Exception: discarding statement XMLEncoder0.writeObject</B>

And in some websites i got information saying that its a bug in java and they needs to rectify it

Check this link

http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4967135

Can any one let me know what is the work around for this ??
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The workaround is what the bug report suggests: sign the applet. You could also write your own encoder/decoder for Font and Color, which shouldn't be too hard. They seem to be in no hurry to fix this problem, which has apparently been known since 2002.
 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ulf

Thanks for ur reply , its not only with Font and Color , it happens for new Integer as well ...

And can you let me know the best way of signing the applets and the user should not be shown that dialogue with Yes/No option
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's an article on how to grant applets permissions as part of the FAQ. With signed applets, you'll always get the dialog asking for permission to execute it at least once; there's no way around that.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!