incubator-jspwiki-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From luca80 <>
Subject Re: JONAS - Policy problem
Date Thu, 31 Jul 2008 08:37:49 GMT

Hi Craig, 
I did what you suggested to me, but I'm stucked loading a resource, Am I
missing some other permission?

I granted all permission to all directories except that of my application.

The policy file look like this:

grant codeBase "file:/C:/tmp/JONAS_4_8_6/bin/-" { permission; };
... granting all to all other dirs ...
grant codeBase
"file:/C:/tmp/JONAS_4_8_6/work/webapps/jonas/single/jonasAdmin/-" {
permission; };
grant codeBase
"file:/C:/tmp/JONAS_4_8_6/work/webapps/jonas/single/JSPWiki/-" { 
	permission java.util.PropertyPermission "*", "read, write"; 
	permission "C:\\tmp\\JONAS_4_8_6\\-", "read, write,

But I get an exception from this code:
url = m_engine.getServletContext().getResource( "/WEB-INF/web.xml" );
which returns null instead of the URL of web.xml.

If I give all permission to all, this code work well. What kind of
permission I'm missing?

I tried also:
grant codeBase "file:/C:/Programmi/Java/-" { permission;};
because the ServletContext is a standard Java class, but it did't work.

Any idea?

Craig L Russell wrote:
> ...
> For starters, you can grant Jonas all permissions by explicitly  
> putting the jonas jar file(s) into their own security domain, e.g.
> grant <jonas jar> { permission;}
> You will quickly find that simple stuff like your application reading  
> java properties will trigger a security exception. So you add stuff to  
> the general grant.
> ... 

View this message in context:
Sent from the JspWiki - User mailing list archive at

View raw message