title: Signed Java Applet Throws Security Exception on Connect to a Webservice
body: <p>I have an java applet running on tomcat 5.5. It is signed ( -selfcert). I still get an <code>java.security.AccessControlException: access denied (java.lang.RuntimePermission createClassLoader)</code> Exception, when my Applet tries to connect to a webservice (already in this line):</p>
  
  <pre><code>ws_locator = new My_WebserviceLocator(ws_adress + "?wsdl",
                  new javax.xml.namespace.QName("http://impl.webservice", "My_Webservice"));
  </code></pre>
  
  <p>Since there are some similar questions here, an i read them: </p>
  
  <ul>
  <li><p>Yes, the applet is signed. I checked it with -verify.</p></li>
  <li><p>Tomcat security exception, may be, but i have added to catalina.policy: </p>
  
  <pre><code>grant codeBase "file:/home/me/apache-tomcat-5.5.27/webapps/myapplet/-" {
      permission java.security.AllPermission;    };
  </code></pre>
  
  <p><code>grant codeBase "file:/home/me/apache-tomcat-5.5.27/webapps/myapplet/applet.jar" {    permission java.security.AllPermission;    };</code></p></li>
  </ul>
  
  <p>and the usual stuff like is also in there: </p>
  
  <pre><code>grant codeBase "file:${java.home}/jre/lib/ext/-" {
          permission java.security.AllPermission;
  };
  </code></pre>
  
  <p>with no result. </p>
  
  <p>Ok, quick update, adding:</p>
  
  <pre><code>grant{
          permission java.security.AllPermission;
  };
  </code></pre>
  
  <p>to the local java.policy file fixes the problem. BUT thats not what i am looking for, the applet should run on an avarage machine, with dafault java.policy file. So it has to be fixed from within the code.</p>