public JSPloader(JSPhandler jh, String jarName, String jarURL) throws javax.servlet.ServletException { // ... initialization stuff ... if (jh.allPermissionPolicy == null) { if (!loadClassDataFS()) { if (!loadClassDataURL()) throw new javax.servlet.ServletException( "JSPloader.JSPloader unable to load jar"); } return; } if (System.getSecurityManager() == null) { System.setProperty("java.security.policy", jh.allPermissionPolicy); Policy.setPolicy( new sun.security.provider.PolicyFile()); System.setSecurityManager(new SecurityManager()); } try { baseURL = new URL(jarURL+"/"+jarName+"/"); } catch(MalformedURLException mue) { throw new javax.servlet.ServletException( "JSPloader.JSPloader " + mue); } String policyFile = jh.cachePath + "/" + jarName + ".policy"; File f = new File(policyFile); if ((f == null) || !f.exists()) { policyFile = jh.cachePath + "/java.policy"; f = new File(policyFile); } if ((f != null) && f.exists()) { System.setProperty("java.security.policy", policyFile); policy = new sun.security.provider.PolicyFile(); System.setProperty("java.security.policy", jh.allPermissionPolicy); } else policy = Policy.getPolicy(); if (!loadClassDataFS()) { if (!copyClassesURL() || !loadClassDataFS()) throw new javax.servlet.ServletException( "JSPloader.JSPloader unable to load jar"); } return; }