Class AntCompiler
java.lang.Object
org.apache.jasper.compiler.Compiler
org.apache.jasper.compiler.AntCompiler
Main JSP compiler class. This class uses Ant for compiling.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAnt logger that captures compilation output for reporting.protected static classHandler that captures System.err output for compilation error reporting. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final ObjectLock object used to synchronize javac compilation when not forking.protected AntCompiler.JasperAntLoggerThe Ant build listener that captures compilation output.protected org.apache.tools.ant.ProjectThe Ant project used for compilation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidgenerateClass(Map<String, SmapStratum> smaps) Servlet compilation.protected org.apache.tools.ant.ProjectReturns the Ant project, initializing it if necessary.Methods inherited from class Compiler
compile, compile, compile, generateJava, getCompilationContext, getErrorDispatcher, getPageInfo, getSmap, init, isOutDated, isOutDated, removeGeneratedClassFiles, removeGeneratedFiles
-
Field Details
-
javacLock
Lock object used to synchronize javac compilation when not forking. -
project
protected org.apache.tools.ant.Project projectThe Ant project used for compilation. -
logger
The Ant build listener that captures compilation output.
-
-
Constructor Details
-
AntCompiler
public AntCompiler()Constructs a new AntCompiler.
-
-
Method Details
-
getProject
protected org.apache.tools.ant.Project getProject()Returns the Ant project, initializing it if necessary.- Returns:
- the Ant project
-
generateClass
protected void generateClass(Map<String, SmapStratum> smaps) throws FileNotFoundException, JasperException, Exception Description copied from class:CompilerServlet compilation. This compiles the generated sources into Servlets.- Specified by:
generateClassin classCompiler- Parameters:
smaps- The source maps for the class(es) generated from the source file- Throws:
FileNotFoundException- Source files not foundJasperException- Compilation errorException- Some other error
-