The problem lies in the Web. xml declaration when a web Project is created.
The web. xml declaration part is generally divided into the following versions of xsd,
Web-app_2_2.dtd
Web-app_2_3.dtd
Web-app_2_4.xsd
Web-app_2_5.xsd
For more details, see the web. xml declaration section of each version, as shown below:
Web-app_2_2.dtd
<? Xml version = "1.0" encoding = "UTF-8"?>
<! DOCTYPE web-app PUBLIC "-// Sun Microsystems, Inc. // DTD Web Application 2.2 // EN"
Http://java.sun.com/dtd/web-app_2_2.dtd>
Web-app_2_3.xsd
<? Xml version = "1.0" encoding = "UTF-8"?>
<! DOCTYPE web-app PUBLIC "-// Sun Microsystems, Inc. // DTD Web Application 2.3 // EN"
Http://java.sun.com/dtd/web-app_2_3.dtd>
Web-app_2_4.xsd
<? Xml version = "1.0" encoding = "UTF-8"?>
<Web-app xmlns = "http://java.sun.com/xml/ns/j2ee" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" version = "2.4" xsi: schemaLocation = "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
Web-app_2_5.xsd
<? Xml version = "1.0" encoding = "UTF-8"?>
<Web-app xmlns = "http://java.sun.com/xml/ns/javaee" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" version = "2.5" xsi: schemaLocation = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
Note !! Among them, servlets 2.4 (the first version after JSP 2.0 came out, if I remember correctly), isELIgnored of this version is set to false by default. So the use of web. xml with web-app_2_4.xsd declaration in the JSP page does not need to specifically declare. Servlets 2.4EL can be used directly.
Other statements cannot be manually stated.
After determining the xsd version in web. xml (if it is not servlets 2.4), add a line in the <% @ page %> part of the JSP declaration, as shown below:
<% @ Page isELIgnored = "false" %>
Or
To set the el expression for the entire project, add the el expression to the web. xml file (control a project)
<Jsp-config>
<Jsp-property-group>
<El-ignored> false </el-ignored>
</Jsp-property-group>
</Jsp-config>
If this parameter is set to false, the EL expression can be parsed.
The simplest solution is to replace the reference of servlets 2.4xsd in web. xml. Replace the following references.
<Web-app xmlns = "http://java.sun.com/xml/ns/j2ee" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" version = "2.4" xsi: schemaLocation = "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">