• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

XMLEncoder with Applet

 
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ??
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
I'm doing laundry! Look how clean this tiny ad is:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic