Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with jstl tags

 
Kerry Wilson
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Kerry Wilson
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64972
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Kerry Wilson
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using tomcat 5.5
 
Kerry Wilson
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64972
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64972
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess this means I am using jstl 1.0:

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64972
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Get thee a JSTL 1.1 implementation fortwith!
 
Esai ADIDRAVID
Greenhorn
Posts: 2
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic