Show TOC

Procedure documentationSetting up the Compiler Locate this document in the navigation structure

 

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 Note

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

End of the note.

Procedure

  1. Start the Config Tool.

  2. Choose   cluster-data   template   instance - <n>   services   Web Container Service  .

  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 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.sun.tools.javac.Main results in a java.lang.NoClassDefFoundError exception.

    End of the note.

    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.