JSP does not support El expression, the solution is

Time:2021-7-20

If you have the following, it means 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, while 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”>
resolvent:
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 expression, you need to 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>

Recommended Today

Implementation example of go operation etcd

etcdIt is an open-source, distributed key value pair data storage system, which provides shared configuration, service registration and discovery. This paper mainly introduces the installation and use of etcd. Etcdetcd introduction etcdIt is an open source and highly available distributed key value storage system developed with go language, which can be used to configure sharing […]