• Post Reply Bookmark Topic Watch Topic
  • New Topic

PropertyResourceBundle and EL  RSS feed

 
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can the new EL access properties from a PropertiesResourceBundle stored in the ServletContext()?
 
Author and ninkuma
Marshal
Posts: 66676
167
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good question. PropertyResourceBundle (and its ancestor ResourceBundle) do not implement the Map interface (which would have clinched it), so unless the EL code was written specifically to interact with the bundles, I'd say the bet was off.
Have you tried it yet?
bear
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Bear Bibeault:
Good question. PropertyResourceBundle (and its ancestor ResourceBundle) do not implement the Map interface (which would have clinched it), so unless the EL code was written specifically to interact with the bundles, I'd say the bet was off.
Have you tried it yet?
bear


Yeah, I have tried it, and since my ServletContext problem persists from my post in Servlets, I don't know if it won't work, or just isn't working.
I initially tried doing ${template.name} and I got some error about how it couldn't find it. Then I did ${template[name]} and I don't get an error, but I also don't get any output. ??
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, ResourceBundle objects won't work but Properties Objects work just fine.
 
The City calls upon her steadfast protectors. Now for a tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!