JSP Editor

Being an intelligent JSP source code editor for JSP development, IntelliJ IDEA provides an unparalleled set of productivity aimed features for editing JSP source code, including:

JSP autoimport
  • All types of code completion
  • Refactorings
  • Syntax error highlighting
  • Live Templates
  • Usage search
  • Import assistant
  • Other JSP-aware editing features

IntelliJ IDEA fully supports the JSP 2.0 specifications.

Automatic namespace import for JSP and JSPX

Type a tag with an unbound namespace prefix, and IntelliJ IDEA offers a set of namespace choices that you can import.

Automatic namespace import for XML, JSP and JSPX Automatic namespace import Automatic namespace import

Note: This also works for XML and HTML files.

JSP/JSPX breadcrumbs

Fast JSP/JSPX navigation with the active breadcrumbs bar.

JSP/JSPX breadcrumbs


Expression language support

Intelligent new code completion and validation fully support the new Expression Language (for easy access to application data stored in JavaBeans).

TagDir and TagFile support

The new tag files format makes it easy to add new tags without writing Java code and providing TLDs. The JSP editor can locate your tags through the direct reference to their containing folder in the tagdir attribute of the taglib directive. IntelliJ IDEA supports both the scriptlet-based .tag and the XML .tagx formats. The JSP editor assists you to include these through code completion, and identifies invalid usage and syntax errors.

JSP tag libraries support

Tag libraries support

JSP tag libraries support extends JSP code completion and error highlighting in IntelliJ IDEA. The intelligent JSP editor even recognizes scripting variables defined by custom JSP tags and lets you complete and refactor them. Since version 6.0 you can also create custom tag files and use them with IntelliJ IDEA projects.

JSP 2.0 Support for JSP Document format (JSPX)

IntelliJ IDEA fully supports JSP 2.0 for the JSP Document format, When working in JSPX documents you will have both the benefits of the XML editor, XML support, as well as the Java code completion and other JSP editor features you are got used to.

Code completion of standard JSP actions and directives

JSP standard actions

IntelliJ IDEA is aware of standard JSP actions and directives, and provides intelligent code completion for them when a JSP file is open in the JSP editor. Completion for names of classes, files and class properties is also supported. So for example, JSP bean references are quick and easy to code without errors.

JSP Error highlighting

Error highlighting

As shown in this example of a JSP bean reference, most of the frequent JSP errors, such as wrong JSP tag structure, wrong property and class names, etc. are highlighted in the JSP source code as you type in a JSP file.

JSP Internationalization (i18n) Support

I18N support in JSP tag text

In the JSP editor, you can easily internationalize tag texts: just select a string in your JSP file and call the Refactor | I18nize JSP text menu command. IntelliJ IDEA will then create a corresponding JSP property replaces the string occurrences with reference to it.

Advanced Navigation

JSP Structure View

IntelliJ IDEA features the JSP structure view that lets you easily review and navigate around the various elements within your JSP pages. IntelliJ IDEA smartly distinguishes between the Java, HTML, scriptlet and other language-specific parts of the JSP files.

JSP-aware refactorings

The new Extract Include refactoring allows you to select a block of JSP code and extract it out into an includable JSP fragment that can be reused across multiple pages. The appropriate JSP include directive is automatically inserted to replace the extracted code.

The Inline refactoring works just the opposite way. When called on an include directive, it will replace it with the contents of the file it refers to.

Additionally, the popular "Find Usages" and "Rename" features can be applied to all JSP scripting variables and property names in standard JSP actions.

JSP validation

All JSP pages from a web application can be validated with the help of the embedded Jasper JSP compiler. Validation is invoked as part of make/rebuild/compile actions which you can trigger in

JSP development just as you do for straight Java development. If an error is found, the convenient view lets you navigate directly to its occurrence in the corresponding JSP page, opening the page in the JSP editor if necessary.

JSP debugging

With native JSR45 support, IntelliJ IDEA lets you debug your JSP's almost like you debug your Java code. Since version 6.0, IntelliJ IDEA supports remote JSP debugging under the set of supported Web Servers. Read more about J2EE development support.