Setting the Compiler for a JSP or Servlet File
When you change the default compiler for JSP and servlet files, the change affects
all JSPs and servlets for which you have not specifically assigned a compiler
type. Setting a compiler type for an individual JSP or servlet overrides the default
compiler setting.
To set the compiler for a JSP or servlet file:
- In the Explorer, click the Filesystems tab. Navigate to the web module subdirectory
containing the JSP file or servlet for which you want to set the compiler.
A JSP file would be in the web module's root directory. A servlet would be
in the web module's WEB-INF/classes directory.
- Right-click the JSP or servlet to display the contextual menu, and choose
Properties.
- On the Execution pane of the Properties window, click the value field of
the Servlet Compiler property to activate the combo box. Choose a compiler
type.
- When you have completed your changes, close the property sheet.
Compiler options include:
- RMI Stub Compiler. This option is not a valid compiler type for JSPs
and servlets.
- External Compilation. The javac compiler runs in a virtual
machine outside the IDE.
- Internal Compilation. The javac compiler that runs within
the same virtual machine as the IDE. javac is a cross-platform compiler.
The advantages of running javac internally are speed, the changes
in the class structure that appear immediately in the Explorer, and the status
bar, which provides information on the dependent classes that are compiled.
- Indirect Ant Compilation. This option is not a valid compiler type
for JSPs and servlets.
- Ant Script Compilation. This option is not a valid compiler type
for JSPs and servlets.
- Do Not Compile. The files in the project are not compiled. Setting
this option for an individual JSP file means that the file will not be compiled.
This option is useful for JSP files that are included in other JSP pages using
the <%@include%> directive, but are not used.
Legal Notices