I'm hoping someone here can help me figure this one out.
I've got Tomcat 5 running with JSTL 2.0 on a 1.4.2 JVM.
I can set a variable using like so:
<c:set var="testVar" value="test value" />
However, when I go to write it out using
<c:out value="${testVar}" />
I get the following output:
${testVar}
And yet, I know the value is being set because doing
<%= pageContext.getAttribute("testVar").toString() %>
Yields:
test value
I am very perplexed by this. Any help would be appreciated.
Seanairt - 18 Apr 2004 17:00 GMT
> I'm hoping someone here can help me figure this one out.
> I've got Tomcat 5 running with JSTL 2.0 on a 1.4.2 JVM.
[quoted text clipped - 14 lines]
>
> I am very perplexed by this. Any help would be appreciated.
Ok. I'll answer my own post in case anybody else comes looking for
help. The problem is that there is a such thing as a version 2.4
deployment descriptor. And then there are all earlier descriptors.
The key difference is that 2.4 is schema validated while
earlier versions are DTD validated. If you are NOT using a 2.4
descriptor, then the default behavior of the container is to
ignore the expression language, per the spec.
If you are using a pre 2.4 descriptor and you want to eval EL,
then you must put a <%@ page isElIgnored="false" %> statement
at the top of your page.
I hope this is of help to somebody, cause figuring this out cost me a day
and a half of heartache.
best regards