aspose file tools*
The moose likes JSP and the fly likes problem with jstl tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "problem with jstl tags" Watch "problem with jstl tags" New topic
Author

problem with jstl tags

Kerry Wilson
Ranch Hand

Joined: Oct 29, 2003
Posts: 254
Sorry if this is a noob question, but if the shoe fits...

This is my first time using these tags. I have these embedded within a tile, but get an intermittent error after about 10 refreshes, here is my code:



And here is the error:



[Bear: edited for format]
[Bear: also disabled smilies]
[ July 29, 2005: Message edited by: Bear Bibeault ]

http://www.goodercode.com
SCJP 1.4
Kerry Wilson
Ranch Hand

Joined: Oct 29, 2003
Posts: 254
I have modified my when clauses to the following:

According to TLD or attribute directive in tag file, attribute test does not accept any expressions



And now about once every 5 refreshes I get this error

According to TLD or attribute directive in tag file, attribute test does not accept any expressions
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61424
    
  67

What container and JSTL implementation are you using? With Tomcat 5 and the Jakarta JSTL, I've never encountered any bizarre issues such as this.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Kerry Wilson
Ranch Hand

Joined: Oct 29, 2003
Posts: 254
I am using tomcat 5.5
Kerry Wilson
Ranch Hand

Joined: Oct 29, 2003
Posts: 254
If i put this in the taglib-uri it works (For some reason)!

http://java.sun.com/jstl/core_rt
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61424
    
  67

You did not answer the question regarding what JSTL implementation, and more impportantly, what version.

It appears that you might be using a JSTL 1.0 implementation which is not appropriate for a JSP 2.0 containter such as Tomcat 5. You should be using a JSTL 1.1 implementation.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61424
    
  67

To add a bit to this:

If your JSTL URI is not

<a href="http://java.sun.com<b rel="nofollow">/jsp</b>/jstl/core" target="_blank">http://java.sun.com/jsp/jstl/core


then you are not using the JSTL 1.1.
Kerry Wilson
Ranch Hand

Joined: Oct 29, 2003
Posts: 254
I guess this means I am using jstl 1.0:

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61424
    
  67

Get thee a JSTL 1.1 implementation fortwith!
Esai ADIDRAVID
Greenhorn

Joined: Dec 07, 2007
Posts: 2
It happened with me too.

I had the following lines in my .jsp file
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>

If you see above, both were core which may be not right.

So, I changed the second laglib to core_rt; that is
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>

The change is from "core" to "core_rt".

Then it worked!!!

Esai
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

Esai ADIDRAVID can you please adjust last name so that it does not contain all uppercase letters.
[ December 05, 2008: Message edited by: Amit Ghorpade ]

SCJP, SCWCD.
|Asking Good Questions|
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with jstl tags