Show TOC

Setting up the CompilerLocate this document in the navigation structure

Context

You can specify the compiler that is used by the Web Container Service to compile Web applications' JSP files. You can choose either to use a compiler such as javac (that executes in a separate process), or to compile a source file by calling the com. sun.tools.javac.Main . You can use the Internal Compiler and External Compiler properties of the Web Container Service to configure the compiler.

Note

Using internal compiler is not recommended and is not supported for all JDK vendors.

Procedure


  1. Start the Config Tool .

  2. Choose Start of the navigation path cluster-data Next navigation step template  Next navigation step instance - <n>  Next navigation step  services  Next navigation step  Web Container Service End of the navigation path.

  3. Next:

    If You Want To

    Then

    Do compiling by calling a method of com.sun.tools.javac.Main

    Set the Internal Compiler property to true .

    Note

    You need to include the tools.jar JDK library (located in the <JDK_directory>\lib directory) to the classpath of your server process. You can do this using the Config Tool as described in Configuring Instances .

    If this library is not present in the server's classpath, then any attempt of the Web Container service to compile a JSP file using the com.s un.tools.javac.Main results in a java.lang.NoClassDefFoundError exception.

    Use a certain type of Java compiler

    Specify the name of the compiler as a value of the External Compiler property. By default, the container uses javac compiler. You must also set the Internal Compiler property to false .

    1. Choose Set to apply the new values.

    2. Choose Apply changes to save the changes.

    3. For the changes to take effect, restart the cluster.