This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

JSTL format tag: Unable to set a runtime expression for attribute key  RSS feed

 
Ranch Hand
Posts: 243
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,



This is the code snippet which is causing the problem. The EL expression itself evaluates fine. (I removed the fmt tag to check this). When i hardcode the key the format tag works , is it not possible to set a EL expression?
Of course, i have the jstl.jar and the standard.jar files in the WEB-INF/lib folder
I'm using the below taglib directive in the JSP


Server info: IBM WebSphere Application Server/6.0
Servlet version: 2.4
JSP version: 2.0
Java version: 1.4.2

I checked the fmt.tld file in standard.jar and it says key can be a runtime expression.



Error : Custom tag attribute key cannot be runtime expression.


Thanks,
Srikkanth
 
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this.
The taglib definition you are using is for JSTL 1.0. You should try this one instead :


 
Srikkanth Mohanasundaram
Ranch Hand
Posts: 243
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oopsie!!!

Works beautifully.Thanks Christophe for your quick response.

Thanks for your help,
Srikkanth
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!