Although there are some differences, the compilation of a JSPsource 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 apreliminary 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:
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 ![]() |
See also | |
---|---|
Creating a JSP or Servlet File Editing a JSP or Servlet File Running a JSP or Servlet File |