public class XJspCompiler extends JDTCompiler
To make this compiler work the following is required:
Modifier and Type | Field and Description |
---|---|
private File |
extensionsJar |
private boolean |
isXJsp |
private long |
lastModified |
private Log |
log |
private static Pattern |
PATH_MATCH
Path to JSP must match: /extensions/[jar-file-name]/[jsp-path].xjsp
group(1) = JAR name, group(2) = JSP path
|
private File |
pluginsDir |
static String |
RESOURCES_URL
The location where the extensions resources are extracted.
|
Constructor and Description |
---|
XJspCompiler() |
Modifier and Type | Method and Description |
---|---|
protected void |
generateClass(String[] smap)
Called when a JSP page needs recompiling.
|
protected URLClassLoader |
getExtensionClassLoader()
Get a class loader that can load classes from the current web application
as well as the extensions JAR file.
|
protected File |
getPluginsDir()
Get the path to the plug-in directory from BASE.
|
protected ClassLoader |
getWebAppClassLoader()
Get the class loader for the web application this JSP is
located in.
|
void |
init(JspCompilationContext ctxt,
JspServletWrapper jsw)
Initialises the compiler.
|
boolean |
isOutDated(boolean checkClass)
Checks if the extensions JAR file has been modified.
|
protected void |
setContextClassLoader()
Sets the context class loader if this JSP page is an
extension JSP page and if the extensions JAR file has been
modified since the last time the class loader was set.
|
compile, compile, compile, generateJava, getCompilationContext, getErrorDispatcher, getPageInfo, getPageNodes, isOutDated, removeGeneratedClassFiles, removeGeneratedFiles
public static final String RESOURCES_URL
private static final Pattern PATH_MATCH
private final Log log
private File pluginsDir
private boolean isXJsp
private File extensionsJar
private long lastModified
public void init(JspCompilationContext ctxt, JspServletWrapper jsw)
protected void generateClass(String[] smap) throws FileNotFoundException, JasperException, Exception
generateClass
in class JDTCompiler
FileNotFoundException
JasperException
Exception
public boolean isOutDated(boolean checkClass)
isOutDated
in class Compiler
protected void setContextClassLoader() throws Exception
Exception
protected URLClassLoader getExtensionClassLoader() throws Exception
Exception
protected ClassLoader getWebAppClassLoader()
protected File getPluginsDir()