Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Srikkanth Mohanasundaram
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
 
Christophe Verré
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!