The solution of JSP can’t parse El expression

Time:2021-5-13

The reason is: by default, servlet 2.4 / JSP 2.0 supports El expressions.

There are two solutions

1. Modify the beginning definition of web.xml.

Copy codeThe code is as follows:
<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 code at the beginning of the page where El expression is used.

Copy codeThe code is as follows:
<%@ page isELIgnored=”false” %>

However, at present, I have only tried the second method. If there are other methods, please let me know.

Recommended Today

. net Maui preview 5 function Preview

Although Microsoft build has just passed, we will continue to share our continuous progress in. Net multi platform application UI (. Net Maui). In this release, we have enabled animation and view transformation, completed the migration of multiple UI components, and improved a single project template.We also released the first batch of preview documents covering […]