Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / April 2004

Tip: Looking for answers? Try searching our database.

jstl el not evaluating

Thread view: 
Seanairt - 17 Apr 2004 19:15 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.

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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.