Tomcat permissions and class loading

Louis Simard louis.simard at gmail.com
Thu Jul 15 23:52:25 UTC 2010


At 2010-07-15 22:25 GMT, Florent Georges <lists at fgeorges.org> wrote:
> Louis Simard wrote:
>
>  Hi,
>
>> Would this do the trick:
>
>  Thanks for your response.
>
>> permission java.lang.RuntimePermission "getClassLoader";
>> permission java.lang.RuntimePermission "createClassLoader";
>
>  I got getClassLoader but not createClassLoader.  After having
> added it, I get now the following error:
>
>    java.security.AccessControlException: access denied
>      (java.lang.RuntimePermission
>      accessClassInPackage.org.apache.tomcat.util.http)
>
>  I wonder if it is possible to grant the accessClassInPackage to
> the webapp without hard-coding the class name in the policy file?
> (the name of the classes to be loaded dynamically are not known
> untill runtime...)
>
>  Regards,
>
> --
> Florent Georges
> http://fgeorges.org/

accessClassInPackage accepts some shortcuts that affect all subpackages:

  permission java.lang.RuntimePermission
"accessClassInPackage.org.apache.tomcat";

will work just as well.




More information about the Ubuntu-devel-discuss mailing list