org.apache.struts2.jasper

## Class CustomCompiler

- java.lang.Object
- - org.apache.struts2.jasper.compiler.Compiler
  - - org.apache.struts2.jasper.CustomCompiler

-     public class CustomCompiler
      extends Compiler

- - ### Field Summary

    - ### Fields inherited from class org.apache.struts2.jasper.compiler.Compiler

      `ctxt, errDispatcher, jsw, log, options, pageInfo, pageNodes, tfp`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CustomCompiler()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `generateClass(String[] smap)` Compile the servlet from .java file to .class file
    `boolean` | `isOutDated()` This is a protected method intended to be overridden by subclasses of Compiler.
    `boolean` | `isOutDated(boolean checkClass)` Determine if a compilation is necessary by checking the time stamp of the JSP page with that of the corresponding .class or .java file.

    - ### Methods inherited from class org.apache.struts2.jasper.compiler.Compiler

      `compile, compile, compile, generateJava, getCompilationContext, getErrorDispatcher, getPageInfo, getPageNodes, init, removeGeneratedClassFiles, removeGeneratedFiles`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CustomCompiler

          public CustomCompiler()

  - ### Method Detail

    - #### isOutDated

          public boolean isOutDated()

      Description copied from class: `Compiler`
      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.
      Overrides:
        `isOutDated` in class `Compiler`
      Returns:
        true if out dated

    - #### isOutDated

          public boolean isOutDated(boolean checkClass)

      Description copied from class: `Compiler`
      Determine if a compilation is necessary by checking the time stamp of the JSP page with that of the corresponding .class or .java file. If the page has dependencies, the check is also extended to its dependants, and so on. This method can by overridden by a subclasses of Compiler.
      Overrides:
        `isOutDated` in class `Compiler`
      Parameters:
        `checkClass` - If true, check against .class file, if false, check against .java file.
      Returns:
        true if out dated

    - #### generateClass

          protected void generateClass(String[] smap)
                                throws FileNotFoundException,
                                       JasperException,
                                       Exception

      Description copied from class: `Compiler`
      Compile the servlet from .java file to .class file
      Specified by:
        `generateClass` in class `Compiler`
      Parameters:
        `smap` - string array
      Throws:
        `FileNotFoundException` - is file was not found
        `JasperException` - in case of jasper errors
        `Exception` - in case of other errors

Copyright © 2000–2026 Apache Software Foundation. All rights reserved.