1

Is there any solution for enabling EL in JSP. For now, I have to add <%@ page isELIgnored="false" %> in all pages. It looks so messy.

I tried add config in web.xml like this

<jsp-config>
    <jsp-property-group>
        <url-pattern>*.jsp</url-pattern>
        <el-ignored>false</el-ignored>
    </jsp-property-group>
</jsp-config>

Any ideas?

ducdhm
  • 1,954
  • 15
  • 26
  • Whats your j2ee version ? And have you added this tags `<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>` – Santhosh Mar 25 '14 at 05:10
  • And also [this](http://stackoverflow.com/questions/2168832/expression-language-in-jsp-not-working/2168974#2168974) could help you – Santhosh Mar 25 '14 at 05:16
  • My j2ee version is 3.0 – ducdhm Mar 25 '14 at 05:41
  • EL is enabled by default if it is supported. What makes you think it isn't working? I assume you mean you are trying to use EL 3.0. Which container are you using? – Mark Thomas Mar 25 '14 at 10:50
  • @MarkThomas There's no EL 3.0. The lastest version is 2.2. After I fallback to use container version 2.4, the EL works – ducdhm Mar 25 '14 at 10:58
  • @Bobkhin Yes there is an EL 3.0. I was a member of the Expert Group that wrote the specification. You aren't being very clear about what you are doing. Again, which container are you using? Additionally, how are you "falling back to container version 2.4" and from what version are you falling back? – Mark Thomas Mar 25 '14 at 11:01
  • @MarkThomas I'm newbie in Java so it's hard for me to explain. Here's my current web-app in web.xml ``. The previous, I used `version=2.5` and `version=3.0` and the EL didnt work. – ducdhm Mar 25 '14 at 14:55
  • For the third time, "Which container are you using." You also still haven't explained why you think EL isn't working. You really need to read this http://www.catb.org/esr/faqs/smart-questions.html – Mark Thomas Mar 26 '14 at 10:51

0 Answers0