JSP

JSP cannot parse the solution of the EL expression


The reason: by default, Servlet 2.4 / JSP 2.0 supports EL expressions.

There are two solutions:

1. Modify the beginning definition of web.xml.


<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

This configuration represents Servlet 2.4 / JSP 2.0.

2. Add a line of code to the beginning of the page where the EL expression is used.

 <%@ page isELIgnored="false" %>

So far, however, I have only tried the second method. If there is any other method, please let me know.