You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Bertalan Fodor <fo...@freemail.hu> on 2005/01/07 23:23:26 UTC

Applet scripting security

Hello,

I've found some message in the archive about this problem, but no answer.
I have Batik-1.5.1.
I'm writing an applet. The applet works but scripting does not.
With the Rhino included in Batik-1.5.1 I get the following exception:

java.security.AccessControlException: access denied (java.lang.RuntimePermission createClassLoader)

and the error message: 
unkown language: text/ecmascript


With Rhino 1.6R1 I get the following exception:

java.lang.RuntimeException: NOT SUPPORTED
	at org.apache.batik.script.rhino.BatikSecurityController.createClassLoader(Unknown Source)
	at org.mozilla.javascript.SecurityController.createLoader(SecurityController.java:143)
...


and the error message:
SVG Error: NOT SUPPORTED


Perhaps I have to make the user give some permission to the applet when loading it. 
But I haven't found anything about how to do this.

Please help,

Bert


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: Applet scripting security

Posted by Bertalan Fodor <fo...@freemail.hu>.
FYI: When stripping the bundled js.jar the applet doesn't work from 
remote locations, because it tells about an "incompatible magic value" 
(ClassFormatError) I had to download latest js.jar and strip that.

Thanks for all help.

Bert

>    I think you can get this to work by simply stripping the js.jar
> file that is distributed with Batik so it doesn't include the classes
> from org/mozilla/javascript/optimizer (you can also strip anything
> outside of the org/mozilla/javascript/ from the jar).



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: Applet scripting security

Posted by Bertalan Fodor <fo...@freemail.hu>.
Thanks, I will try this.

Bert

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: Applet scripting security

Posted by Thomas DeWeese <Th...@Kodak.com>.
Hi Bertlan,

    I think you can get this to work by simply stripping the js.jar
file that is distributed with Batik so it doesn't include the classes
from org/mozilla/javascript/optimizer (you can also strip anything
outside of the org/mozilla/javascript/ from the jar).

Bertalan Fodor wrote:

> I've found some message in the archive about this problem, but no answer.
> I have Batik-1.5.1.
> I'm writing an applet. The applet works but scripting does not.
> With the Rhino included in Batik-1.5.1 I get the following exception:
> 
> java.security.AccessControlException: access denied 
> (java.lang.RuntimePermission createClassLoader)



> 
> and the error message: unkown language: text/ecmascript
> 
> 
> With Rhino 1.6R1 I get the following exception:
> 
> java.lang.RuntimeException: NOT SUPPORTED
>     at 
> org.apache.batik.script.rhino.BatikSecurityController.createClassLoader(Unknown 
> Source)
>     at 
> org.mozilla.javascript.SecurityController.createLoader(SecurityController.java:143) 
> 
> ...
> 
> 
> and the error message:
> SVG Error: NOT SUPPORTED
> 
> 
> Perhaps I have to make the user give some permission to the applet when 
> loading it. But I haven't found anything about how to do this.
> 
> Please help,
> 
> Bert
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org