title: How to give JSP permissions with SecurityManager policy file in Resin?
body: <p>We are trying to use SecurityManager with Resin 3.1.9 and run into the following problem: CodeSource.getLocation() returns null for compiled JSPs.</p>
  
  <p>This means that we cannot use a specific codebase in grant clause in our policy file, for example:</p>
  
  <pre><code>grant codeBase "file:/path_to_resin/runtime/work/-" {
  OR grant codeBase "file:/path_to_resin/webapp/JSP-source/-" {
    //...some jsp-specific permissions
  };
  </code></pre>
  
  <p>Instead, we have to use a universal grant clause:</p>
  
  <pre><code>grant  {
    //..some jsp-specific permissions. Unfortunately, these will be applied
    //to all code!!!
  };
  </code></pre>
  
  <p>Is there a way to make JSPs have a proper CodeSource? We'd like to restrict the permissions of third-party libraries, but give permissions to our own JSPs. If we cannot specify JSPs in the policy file, we might not be able to do this, or what do you think?</p>
  
  <p>EDIT: We deploy JSPs as-is, so don't recompile them. That might have something to do with the problem.</p>