EL in Tomcat does not work if /WEB-INF/web.xml exists for a project. In a JSP page, with 1 + 2 + 3 = ${1 + 2 + 3}, 1 + 2 + 3 = 6 should be displayed, instead, it is shown verbatim. JSP pages otherwise work, ie. 1 + 2 + 3 = <%= 1 + 2 + 3 %> works fine. This occurs even if the web.xml contains only the start and end tags for web-app. If the web.xml is removed, EL works fine. Reproducible: Always Steps to Reproduce: 1. Install tomcat and start as usual with default config 2. Create a test.jsp in the webapps/ROOT directory with the EL code from above in it. 3. Browse to test.jsp. It should be shown as ${1 + 2 + 3} not 6. 4. Remove WEB-INF/web.xml 5. Remove the java/class files from /opt/tomcat/work 6. Restart Tomcat 7. Browse to the file to see 6 show up. Actual Results: See steps. Expected Results: EL should work regardless of web.xml Occurs with both sun-jdk-1.4.2.04 and blackdown-jdk-1.4.1
Looks like a configuration error. Seems that EL is disabled if Tomcat thinks that the web app is older than JSP 2.0. Using <%@ page isELIgnored="false" %> at the top of a JSP page fixed it.