Servlet source files are created and managed in the IDE in much the same way as other file types. The easiest way to work with servlet source files from the IDE is to put them in a subdirectory of WEB-INF/classes of a mounted web module. When you create the servlet using the following steps, the IDE puts the class and its package structure under WEB-INF/classes.
To create a servlet source file:
![]() |
If you want to keep your source separate from your class files, you must mount the directory above the package root and you must use the Options window to select WEB-INF/classes as the project's target directory for the External Compiler. Doing so ensures that code completion and compiling are supported by the IDE. |
If you create a servlet outside the IDE, the IDE treats the servlet as an ordinary
Java class. For the servlet features to be available, you must tell the IDE
to treat this class as a servlet. Right-click the class and choose Tools Mark
as Servlet from the contextual menu. When the class is marked as a servlet,
the class's property window has properties for the URI, request parameters,
and content language.
For information on other file management tasks, such as mounting and unmounting filesystems, creating and customizing templates, and searching for files, see "Managing Objects in the IDE" in the Core IDE Help Set.
See also | |
---|---|
Editing a Servlet Source File Servlet Property Sheet About Running Web Modules About Debugging Web Modules About Creating Web Modules Where to Put Web Module Files |