EL expressions are not evaluated in JBoss AS 4.2.2
EL expressions are not evaluated in JBoss AS 4.2.2. I have web.xml
declared conform the Servlet 2.4 spec.
<web-app id="WebApp_ID" 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">
What needs to be done more in 开发者_如何学编程order to get EL to work in JBoss AS 4.2.2?
Your web.xml
root declaration looks fine.
Other causes to exclude:
Ensure that you don't have Servlet/JSP/EL libraries of a different servletcontainer make/version in your webapp's
/WEB-INF/lib
likeservlet-api.jar
,jsp-api.jar
,el-api.jar
, etc. More than often starters drop a copy of those files from unknown resource in there to overcome compilation problems, but that's the wrong approach!Ensure that you don't have
<%@page isELIgnored="true" %>
in your JSPs.Ensure that you don't have the following in your
web.xml
:<jsp-config> <el-ignored>true</el-ignored> <jsp-config>
Add
<%@page isELIgnored="false" %>
in your JSP.
I had a similar issue with Tomcat 6. Even though EL was not disabled globally (thru web.xml). I had to individually enable EL in my JSPs thru the above statement.
精彩评论