JSP cannot parse the solution of the EL expression

  • 2020-05-19 05:30:10
  • OfStack

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

Related articles: