Editing standard JSP files is similar to editing HTML, and the Source Editor provides support for both HTML and JSP tags. Editing JSP documents is similar to editing XML. The IDE provides additional support for JSP syntax, including code completion for the following elements:
The IDE provides smart-case code completion for HTML. When you start writing a tag, the IDE offers code completion in upper case or lower case, depending on the case you are using.
![]() |
To enable code completion for a JavaBean class, the JSP file must have a valid jsp:useBean directive, the class must be in a package, and the class must be available from either the WEB-INF/classes directory tree or from a library in the WEB-INF/lib directory. To enable code completion for tags in tag libraries, the JSP file must have a valid taglib directive for the library and the library must be in the WEB-INF/lib directory. |
Other examples of additional JSP support are the highlighting of JSP tags, JSP directives, and EL expressions, and the display of matching JSP tags, JSP delimiters (<>), and EL delimiters ({}).
To reformat selected code, right-click in the Source Editor and choose Reformat Code from the contextual menu. If no code is selected, the IDE acts as if the whole file has been selected. The IDE indents nested tags only if both the start and end parent tags are in the selected area. Note that this action does not reformat scriptlets.
To edit a JSP file:
See also | |
---|---|
Creating a JSP File About JSP Syntax Validating JSP Syntax About Debugging Web Modules Viewing a JSP's Servlet |