Google

Compiler (Jasper Internal API Documentation)

org.apache.jasper.compiler
Class Compiler


java.lang.Object

  |

  +--org.apache.jasper.compiler.Compiler

Direct Known Subclasses:
CommandLineCompiler, JspCompiler

public class Compiler
extends java.lang.Object

If you want to customize JSP compilation aspects, this class is something you should take a look at. Hope is that people can just extend Compiler and override things like isOutDated() but inherit things like compile(). This might change.

Author:
Anil K. Vijendran, Mandar Raje, Pierre Delisle

Field Summary
protected  JspCompilationContext ctxt
           
protected  JavaCompiler javac
           
protected  Mangler mangler
           
 
Constructor Summary
Compiler(JspCompilationContext ctxt)
           
 
Method Summary
 java.lang.String changeEncodingIfNecessary(JspReader tmpReader)
          Change the encoding for the reader if specified.
 boolean compile()
          Compile the jsp file from the current engine context
 boolean isOutDated()
          This is a protected method intended to be overridden by subclasses of Compiler.
 void removeGeneratedFiles()
          Remove generated files
 void setJavaCompiler(JavaCompiler javac)
          Set java compiler info
 void setMangler(Mangler mangler)
          Set Mangler which will be used as part of compile().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

javac


protected JavaCompiler javac

mangler


protected Mangler mangler

ctxt


protected JspCompilationContext ctxt
Constructor Detail

Compiler


public Compiler(JspCompilationContext ctxt)
Method Detail

compile


public boolean compile()
                throws java.io.FileNotFoundException,
                       JasperException,
                       java.lang.Exception
Compile the jsp file from the current engine context

Returns:
true if the class file was outdated the jsp file was recompiled.
java.io.FileNotFoundException
JasperException
java.lang.Exception

isOutDated


public boolean isOutDated()
This is a protected method intended to be overridden by subclasses of Compiler. This is used by the compile method to do all the compilation.


setJavaCompiler


public void setJavaCompiler(JavaCompiler javac)
Set java compiler info


setMangler


public void setMangler(Mangler mangler)
Set Mangler which will be used as part of compile().


changeEncodingIfNecessary


public java.lang.String changeEncodingIfNecessary(JspReader tmpReader)
                                           throws ParseException
Change the encoding for the reader if specified.

ParseException

removeGeneratedFiles


public void removeGeneratedFiles()
Remove generated files



Copyright 2000 Apache Software Foundation. All Rights Reserved.