• Post Reply Bookmark Topic Watch Topic
  • New Topic

Dynamic application resource messages

 
Kerry Wilson
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to insert message resources into a JSP page with a dynamic key. I was going to use fmt, but I guess it doesn't allow expressions. Is there another tablib that will do this.

It would be good if I could use the struts bean taglib in someway, but this request is not being processed through the action servlet, but a different servlet.

Any Ideas/Suggestions?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was going to use fmt, but I guess it doesn't allow expressions.


What do you mean by this?
 
Kerry Wilson
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried using <<fmt:message key="${page}.title"/>

and got the no expressions error below:

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

BTW, here is my taglib uri:

http://java.sun.com/jstl/fmt

Is this an older implementation?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What version of JSP are you using?

That is a JSTL 1.0 URI. If you are using JSP 2.0 you should be using JSTL 1.1.
 
Kerry Wilson
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the uri for jstl 1.1?
 
Kerry Wilson
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got it fmt_rt, I am horrible at this version stuff.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JSTL 1.1 URI would be http://java.sun.com/jsp/jstl/fmt

The _rt format is an alternative JSTL 1.0 URI.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!