00001
00026 package org.objectweb.jonas_lib.loader;
00027
00028 import java.io.IOException;
00029 import java.net.URL;
00030
00039 public class WebappClassLoader extends SimpleWebappClassLoader {
00040
00042 private static final String CLASSES_DIRECTORY = "WEB-INF/classes/";
00043
00045 private static final String LIB_DIRECTORY = "WEB-INF/lib/";
00046
00054 public WebappClassLoader(URL module) throws IOException {
00055 super(module);
00056 }
00057
00066 public WebappClassLoader(URL module, ClassLoader parent) throws IOException {
00067 super(module, parent);
00068 }
00069
00076 protected void init() throws IOException {
00077 super.init();
00078 addInRepository(CLASSES_DIRECTORY);
00079 addContentInRepository(LIB_DIRECTORY);
00080 }
00081
00085 public URL getBaseURL() {
00086 return getBases()[0];
00087 }
00088
00089 }