Today, I encountered a puzzling problem, that is, when using MyEclipse5.5 or 6.0, encountered the problem of resolving the El expression. After several hours of pondering finally found, to give everyone a share
The problem is the Web.xml statement on the Web project under construction.
The Web.xml Declarations section 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
A more detailed list of each version of the Web.xml Declaration section, as follows:
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" >
Attention!! where Servlets 2.4 (I remember correctly the first version after JSP 2.0), this version of the iselignored default setting to False. So use the web.xml in the Web-app_2_4.xsd declaration in the JSP page without deliberately declaring. Servlets 2.4EL can be used directly.
and others must be made by hand.
After determining the XSD version in Web.xml (if not servlets 2.4) Be sure to add a line to the JSP's declaration (<% @page%>) section, as follows:
<%@ page iselignored= "false"%>
Or
Set up an entire project using El expressions, you need to add (control a project) in the Web.xml
<jsp-config>
<jsp-property-group>
<el-ignored>false</el-ignored>
</jsp-property-group>
</jsp-config>
This is set to False to resolve an El expression.
The easiest way to do this is to replace the Servlets 2.4xsd reference directly in Web.xml with your current one. Replace with the following reference.
<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" >