Although there are some differences, the compilation of a JSP
source file proceeds in much the same way as 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 Programs.
To compile a JSP file:
Compile.
The status bar of the main window indicates the outcome of the compilation step. If the file compiles successfully, the status line indicates Finished.
![]() |
By default, error pages and other
JSP pages referenced using
<jsp:useBean>, <jsp:include>, or
<jsp:forward>
are compiled automatically with the main JSP file. To change that
default setting, select Tools Options. Click the JSP node, and in the properties sheet, set the Also Compile Error Page and Also Compile
Incl. and Forw. combo boxes to False.
JavaBeans components referenced by your JSP source file are also
compiled automatically with the JSP file. This feature is not settable.
|
| See also | |
|---|---|
| Creating a JSP or Servlet File Editing a JSP or Servlet File Running a JSP or Servlet File |
|