If the following content exists, it indicates Servlet 2.3/JSP 1.2.
<! -- CTYPE web-app PUBLIC </sp -->
"-// Sun Microsystems, Inc. // DTD Web Application 2.3 // EN"
Http://java.sun.com/dtd/web-app_2_3.dtd>
By default, Servlet 2.3/JSP 1.2 does not support EL expressions, whereas Servlet 2.4/JSP 2.0 does.
If the following settings of web. xml do not support EL expressions:
<Web-app version = "2.5"
Xmlns = "http://java.sun.com/xml/ns/javaee"
Xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"
Xsi: schemaLocation = "http://java.sun.com/xml/ns/javaee
Http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd>
Solution:
1. Modify the web. xml file to (Servlet 2.4/JSP 2.0 ):
<Web-app version = "2.4"
Xmlns = "http://java.sun.com/xml/ns/javaee"
Xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"
Xsi: schemaLocation = "http://java.sun.com/xml/ns/javaee
Http://java.sun.com/xml/ns/javaee/web-app_2_4.xsd>
2. To set a jsp page to use el expressions, you must add (control a single page) to the jsp page)
<% @ Page isELIgnored = "false" %>
<Jsp-config>
<Jsp-property-group>
<Url-pattern> *. jsp </url-pattern>
<El-ignored> false </el-ignored>
</Jsp-property-group>
</Jsp-config>