• Post Reply Bookmark Topic Watch Topic
  • New Topic

Trying to set custom ResourceBundle for c:if  RSS feed

 
Greg Akins
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd like to be able to add a custom ResourceBundle in a Struts2 app so that I can use the properties in a c:if tag

For example, my resource bundle is created like //where x and y are parameters that allow the resource bundle to be based on specific db values.

Then, if there is a value in the bundle, then I'd like to be able to use
Is this possible? Or is there something that will accomplish basically the same thing?

A key constraint that seems like it might cause problems is that my DbResourceBundle has to have the two parameter constructor.

Any help, or pointers to more information would be much appreciated.

Thanks!

-greg
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66158
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Greg Akins
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:


Thanks Bear. I'm still struggling with how to add my ResourceBundle.. I seems like it should be pretty simple. Hence, I think I'm being dense. Every example I find is for loading a text properties file. I can't find anything for just loading ResourceBundle.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66158
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not anything you'd do in a JSP.

I'd set up the bundle in a context listener at app startup.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!