public class ServletClassLoader extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
USE_CLASSPATH_LIB
Load the Servlet code from the WAR file and use the current
classpath for the libraries.
|
static int |
USE_CURRENT_CLASSPATH
Use the current class loader to load the servlet and the libraries.
|
static int |
USE_WAR_EXTERNAL_LIB
Load the servlet code and the standard libraries from the CLASSPATH.
|
static int |
USE_WAR_LIB
Load the servlet code and the libraries from the WAR file.
|
static int |
USE_XINS_LIB
Load the servlet code from the WAR file and try to find the libraries
in the same directory as this xins-common.jar and <:parent>/lib
directory.
|
| Constructor and Description |
|---|
ServletClassLoader() |
| Modifier and Type | Method and Description |
|---|---|
static ClassLoader |
getServletClassLoader(File warFile,
int mode)
Gest the class loader that will loader the servlet.
|
public static final int USE_CURRENT_CLASSPATH
public static final int USE_CLASSPATH_LIB
public static final int USE_XINS_LIB
public static final int USE_WAR_LIB
public static final int USE_WAR_EXTERNAL_LIB
public static ClassLoader getServletClassLoader(File warFile, int mode) throws IOException
warFile - the WAR file containing the Servlet.mode - the mode in which the servlet should be loaded. The possible values are
USE_CURRENT_CLASSPATH, USE_CLASSPATH_LIB,
USE_XINS_LIB, USE_WAR_LIB,
USE_WAR_EXTERNAL_LIB.IOException - if the file cannot be read or is incorrect.See http://www.xins.org/.