Forum Stats

  • 3,872,599 Users
  • 2,266,457 Discussions


Applet XML Security

843834 Member Posts: 49,972
edited Jul 27, 2001 3:22PM in Java Technology & XML
I faced problem when creating a transformer to transform a DOM to xml string in Applet.
An exception for reading System property is resulted.
(java.util.PropertyPermission method read)

I would like to ask are there solutions to this?



  • 843834
    843834 Member Posts: 49,972
    My two cents: We have the same SecurityExceptions when JAXP is doing a System.getProperty on java.home property, which applet specification forbids. So we think JAXP is meant to be run in a servlet, rather an in an applet (unless Sun could correct us on that). Those property reads would need to be removed if they were to run in an applet.

    You might want to check out other SOAP clients, for example, SOAPRMI. A beta version is at:
  • 843834
    843834 Member Posts: 49,972
    The problem is that TransformerFactory and DocumentBulderFactory both read from the System Properties to determine which Transformer or DocumentBuilder to instansiate. This is a no-no in an applet.

    You could try creating an instance of the factory yourself (TransformerFactory = new org.apache.xalan.blahblahblah()). That may get around the problem.
This discussion has been closed.