aspose file tools*
The moose likes JSP and the fly likes Why JSTL core tag doesn't support EL? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Why JSTL core tag doesn Watch "Why JSTL core tag doesn New topic
Author

Why JSTL core tag doesn't support EL?

Ren Shao
Ranch Hand

Joined: Dec 23, 2002
Posts: 51
I'm using JSTL core taglib, I use the standard URI http://java.sun.com/jstl/core, and have my c.tld in /WEB-INF/lib, with Tomcat 5.5.9.

It keeps complaining about "attribute value does not accept any expressions", however, when I changed the uri to core_rt, it all works.

I read the JSTL documentation, core_rt is for scripting, like <%= session.getAttriute("aa") %>, and core is supposed to support EL like ${}, but why it's the other way around?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61753
    
  67

I'm using JSTL core taglib, I use the standard URI http://java.sun.com/jstl/core, and have my c.tld in /WEB-INF/lib, with Tomcat 5.5.9.


You're using the wrong version of the JSTL.

The URI you listed is a JSTL 1.0 URI. Yet you are using Tomcat 5 which is a JSP 2.0 container. Therefore, you should be using a JSTL 1.1 implementation.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ren Shao
Ranch Hand

Joined: Dec 23, 2002
Posts: 51
I downloaded JSTL 1.1.2 from Apache, which I believe is the latest version and I still got this problem,

I can evaluate EL using core_rt, but not core. while according to the official documentation, I should use core for EL but not core_rt, can anyone help?
[ July 15, 2005: Message edited by: Ren Shao ]
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

Originally posted by Ren Shao:
I downloaded JSTL 1.1.2 downloade from Apache, which I believe is the latest version and I still got this program,

I can evaluate EL using core_rt, but not core. while according to the official documentation, I should use core for EL but not core_rt, can anyone help?


If you've left the c.tld in your WEB-INF folder and it's from the 1.0 version, it could be referencing that instead of the TLD in the JAR file. You don't need the actual tld file anymore, so check that. Otherwise, I am not sure. Maybe your expression isn't right?


GenRocket - Experts at Building Test Data
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61753
    
  67

I use the standard URI http://java.sun.com/jstl/core


Again, this is the wrong URI.

The correct JSTL 1.1 URI is http://java.sun.com/jsp/jstl/core

If you don't have a copy of the JSTL 1.1 Specification open on your desk, you're doing it wrong.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why JSTL core tag doesn't support EL?