EL expressions are not evaluated in JBoss AS 4.2.2
Asked Answered
W

2

1

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?

Weeden answered 14/6, 2011 at 12:36 Comment(0)
H
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 like servlet-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>
    
Harvin answered 14/6, 2011 at 12:45 Comment(0)
M
0

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.

Mansized answered 14/6, 2011 at 15:21 Comment(1)
This by the way implies that the Tomcat of the host where you deployed the webapp to has a <el-ignored>true</el-ignored> in its /conf/web.xml.Harvin

© 2022 - 2024 — McMap. All rights reserved.