Check for the reserved sequence '#{' in JSP files

This rule flags the use of the '#{' sequence in JSP files. In JSP 2.1, the syntax #{} is now a reserved keyword. When older JSP files that contain the sequence #{} are used in JSP 2.1, they will generate an error.

In order to detect the #{ sequence the following conditions must be met:

Note the following items:

An automated fix will add the escape character before the #{ syntax.

Example:
<h1>This is an example of template text that will be detected: #{detected}</h1>

The automated fix will change this code to:

<h1>This is an example of template text that will be detected: \#{detected}</h1>

There are also different ways to deactivate the Expression Language (EL):


Note about precedence:
The isELIgnored and deferredSyntaxAllowedAsLiteral attributes of the page directive have precedence over the respective elements and values in web.xml. These page directive attributes override the values of the respective elements in web.xml.

For additional information, see: