Home> Java> javaTutorial> body text

What version of jsp supports el expressions

(*-*)浩
Release: 2020-09-17 16:30:34
Original
2845 people have browsed it

By default, the "Servlet 2.4/JSP2.0" version of jsp supports EL, but "Servlet2.3/1.2" does not support EL expressions. The "servlets 2.4" version of "isELIgnored" The default is "false", "servlets 2.5" is not supported by default.

What version of jsp supports el expressions

In JSP2.0, EL language is added, which can be used to obtain data and further transfer the scriptlet code from the JSP page. separated from .

EL language brings convenience to everyone, but sometimes, you will encounter situations where EL expressions cannot be displayed. Below, I will list several situations where EL expressions cannot be displayed and their solutions. Solution:

1.WEB-INF/web.xml, the deployment description file of the web application refers to version 2.3 or earlier of the servlet specification (i.e. jsp1.2

or earlier earlier), the jsp2.0 expression language is automatically disabled in the web application. Note that the version attribute should be version 2.4 and above.

If it is version 2.3, the xml directive and document type The definition is as follows:

 
Copy after login

If it is version 2.4, it is:

 
Copy after login

2. In web.xml, whether the jsp expression is disabled Formula language

  /legacy/*.jsp true  
Copy after login

The solution to this situation is to change true to false

3. Disable jsp expression language on the page

<%@ page isELEnabled ="false"%>

Solution: Change to< ;%@ page isELEnabled ="true"%>

2.4 version supports el expression by default. If you use version 2.5, el expression is turned off by default, and the above <%@ page isELEnabled =" true"%>can no longer be used.

Then the jsp page should add <%@ page isELIgnored="false"%>

The above is the detailed content of What version of jsp supports el expressions. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
jsp
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!