Compiling a JSP Source File

Although there are some differences, the compilation of a JSP source file proceeds in much the same way as for other file types in the IDE. The main difference is that the compilation of a JSP source file involves a preliminary phase where the JSP source file (.jsp) is translated into a servlet source file (.java). The servlet source file is then compiled into a .class file like any other Java program.

The following are the minimal instructions for compiling a JSP source file. For complete information on compiling files in the IDE, including choosing a compiler and configuring it, see Compiling a Program

To compile a JSP file:

  1. In the IDE Explorer, click the Filesystems tab and locate your JSP file.

  2. From the IDE main menubar, select Build Compile.

    The status bar of the IDE main menubar will indicate the outcome of the compile step. If the file compiles successfully, the status line will indicate Finished.
By default, error pages and other JSP pages referenced using <jsp:useBean>, <jsp:include>, or <jsp:forward> will be compiled automatically with the main JSP file. To change that default setting, select Tools Options and set the respective fields to False.

(JavaBeans components referenced by your JSP source file will also be compiled automatically with the JSP file. This is not settable.)
See also
Creating a JSP File
Editing a JSP File
Running a JSP File

Legal Notices