问题描述
|
在JBoss AS 4.2.2中不评估EL表达式。我已声明“ 0”符合Servlet 2.4规范。
<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\">
为了使EL在JBoss AS 4.2.2中工作,还需要做些什么?
解决方法
您的
web.xml
根声明看起来不错。
排除的其他原因:
确保在您的Web应用程序的/WEB-INF/lib
(例如servlet-api.jar
,jsp-api.jar
,el-api.jar
等)中没有不同servlet容器制造商/版本的Servlet / JSP / EL库。在那里克服编译问题,但这是错误的方法!
确保您的JSP中没有ѭ7。
确保您的“ 0”中没有以下内容:
<jsp-config>
<el-ignored>true</el-ignored>
<jsp-config>
, 加
<%@page isELIgnored=\"false\" %>
在您的JSP中。
我对Tomcat 6也有类似的问题。即使未全局禁用EL(通过web.xml)。通过上述声明,我不得不在我的JSP中单独启用EL。