Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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: 66797
168
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!