public class JspCompiler extends java.lang.Object implements EnvironmentBean
com.caucho.jsp.JspCompiler [flags] jsp1 jsp2 ... -app-dir : The directory root of the web-app. -class-dir: The working directory to use as output. -conf: A configuration file for the compiler. -extensions: A comma-separated list of file extensions to compile (default: jsp, jspx, jsfx). -verbose: enable compilation logging.
Modifier and Type | Class and Description |
---|---|
class |
JspCompiler.ApplicationConfig |
Constructor and Description |
---|
JspCompiler() |
Modifier and Type | Method and Description |
---|---|
void |
addCoda(java.lang.String coda)
Adds a coda include.
|
void |
addExtension(java.lang.String extension)
Adds a file extension to compile.
|
void |
addPrelude(java.lang.String prelude)
Adds a prelude include.
|
boolean |
addTag(java.lang.String className)
Adds a new tag being compiled.
|
void |
close() |
Page |
compile(Path jspPath,
java.lang.String uri)
Compiles the JSP file specified with jspFile.
|
void |
compileBatch(java.lang.String[] pendingClasses) |
void |
compilePath(java.util.ArrayList<java.lang.String> pendingClasses,
java.lang.String uri) |
int |
configureFromArgs(java.lang.String[] args)
Callable by applications to initialize the compiler.
|
JspCompiler.ApplicationConfig |
createApplication()
Initialize values based on the ServletContext.
|
JspPropertyGroup |
createJsp()
Sets the JspPropertyGroup
|
WebApp |
createWebApp(Path rootDirectory)
Initialize values based on the ServletContext.
|
Path |
getAppDir()
Gets the source webApp directory.
|
Path |
getClassDir()
Gets the destination class directory.
|
java.lang.ClassLoader |
getClassLoader()
Returns the classloader for configuration.
|
JspCompilerInstance |
getCompilerInstance(Path jspPath,
java.lang.String uri)
Returns the compilation instance.
|
JspCompilerInstance |
getCompilerInstance(Path jspPath,
java.lang.String uri,
java.lang.String className)
Returns the compilation instance.
|
JspPropertyGroup |
getJspPropertyGroup()
Sets the JspPropertyGroup
|
java.lang.ClassLoader |
getParentLoader() |
JspResourceManager |
getResourceManager()
Gets the resource manager.
|
TagFileManager |
getTagFileManager()
Gets the tag file manager.
|
TaglibManager |
getTaglibManager() |
WebApp |
getWebApp()
Returns the app.
|
boolean |
hasRecursiveCompile()
Has recursive compile.
|
void |
init() |
boolean |
isXml()
True when XML is the default parser.
|
java.lang.Object |
loadClass(java.lang.String className,
boolean autoCompile)
Loads an already-compiled JSP class.
|
Page |
loadPage(java.lang.String className,
boolean isAutoCompile)
Loads an already-compiled JSP class.
|
Page |
loadStatic(java.lang.String className,
boolean isSession)
Loads an already-compiled JSP class.
|
static void |
main(java.lang.String[] args) |
void |
setAppDir(Path path)
Sets the source webApp directory.
|
void |
setClassDir(Path path)
Sets the destination class directory.
|
void |
setClassDirectory(Path path)
Sets the destination class directory.
|
void |
setClassLoader(java.lang.ClassLoader loader) |
void |
setJspManager(JspManager jspManager) |
void |
setParentLoader(java.lang.ClassLoader parentLoader) |
void |
setResourceManager(JspResourceManager manager)
Sets the resource manager.
|
void |
setVerbose(boolean isVerbose)
Set true to enable compilation logging.
|
void |
setWebApp(WebApp app)
Initialize values based on the ServletContext.
|
void |
setXml(boolean isXml)
Set true when XML is the default parser.
|
static java.lang.String |
urlToClassName(java.lang.String name)
Mangles the name.
|
public void setJspManager(JspManager jspManager)
public void setParentLoader(java.lang.ClassLoader parentLoader)
public java.lang.ClassLoader getParentLoader()
public void addExtension(java.lang.String extension)
public java.lang.ClassLoader getClassLoader()
getClassLoader
in interface EnvironmentBean
public void setClassLoader(java.lang.ClassLoader loader)
public void setClassDir(Path path)
public void setClassDirectory(Path path)
public Path getClassDir()
public void setAppDir(Path path)
public Path getAppDir()
public void addPrelude(java.lang.String prelude)
public void addCoda(java.lang.String coda)
public void setXml(boolean isXml)
public boolean isXml()
public void setVerbose(boolean isVerbose)
public void setResourceManager(JspResourceManager manager)
public JspResourceManager getResourceManager()
public TagFileManager getTagFileManager()
public TaglibManager getTaglibManager() throws JspParseException, java.io.IOException
JspParseException
java.io.IOException
public JspPropertyGroup createJsp()
public JspPropertyGroup getJspPropertyGroup()
public WebApp createWebApp(Path rootDirectory)
public void setWebApp(WebApp app)
public JspCompiler.ApplicationConfig createApplication()
public WebApp getWebApp()
public boolean addTag(java.lang.String className)
public boolean hasRecursiveCompile()
public static java.lang.String urlToClassName(java.lang.String name)
public Page compile(Path jspPath, java.lang.String uri) throws java.lang.Exception
jspPath
- the path to the JSP sourceuri
- the uri for the JSP filejava.lang.Exception
public JspCompilerInstance getCompilerInstance(Path jspPath, java.lang.String uri) throws java.lang.Exception
java.lang.Exception
public void init() throws JspParseException, java.io.IOException
JspParseException
java.io.IOException
public JspCompilerInstance getCompilerInstance(Path jspPath, java.lang.String uri, java.lang.String className) throws java.lang.Exception
java.lang.Exception
public Page loadPage(java.lang.String className, boolean isAutoCompile) throws java.lang.Throwable
className
- the mangled classname for the JSP file.java.lang.Throwable
public java.lang.Object loadClass(java.lang.String className, boolean autoCompile) throws java.lang.Throwable
className
- the mangled classname for the JSP file.java.lang.Throwable
public Page loadStatic(java.lang.String className, boolean isSession) throws java.lang.Exception
className
- the mangled classname for the JSP file.java.lang.Exception
public void close()
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public int configureFromArgs(java.lang.String[] args) throws java.lang.Exception
com.caucho.jsp.JspCompiler [flags] jsp1 jsp2 ... -app-dir : The directory root of the web-app. -class-dir: The working directory to use as output. -conf: A configuration file for the compiler. -extensions: A comma-separated list of file extensions to compile (default: jsp, jspx, jsfx). -verbose: enable compilation logging
java.lang.Exception
public void compilePath(java.util.ArrayList<java.lang.String> pendingClasses, java.lang.String uri) throws java.lang.Exception
java.lang.Exception
public void compileBatch(java.lang.String[] pendingClasses) throws java.lang.Exception
java.lang.Exception