1 25 26 package org.objectweb.jonas_lib.loader; 27 28 import java.io.IOException ; 29 import java.net.URL ; 30 31 39 public class WebappClassLoader extends SimpleWebappClassLoader { 40 41 42 private static final String CLASSES_DIRECTORY = "WEB-INF/classes/"; 43 44 45 private static final String LIB_DIRECTORY = "WEB-INF/lib/"; 46 47 54 public WebappClassLoader(URL module) throws IOException { 55 super(module); 56 } 57 58 66 public WebappClassLoader(URL module, ClassLoader parent) throws IOException { 67 super(module, parent); 68 } 69 70 76 protected void init() throws IOException { 77 super.init(); 78 addInRepository(CLASSES_DIRECTORY); 79 addContentInRepository(LIB_DIRECTORY); 80 } 81 82 85 public URL getBaseURL() { 86 return getBases()[0]; 87 } 88 89 } 90 | Popular Tags |