The EL problem is not supported in JSP development __JS

Source: Internet
Author: User

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" >

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.