aspose file tools*
The moose likes JSP and the fly likes PropertyResourceBundle and EL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "PropertyResourceBundle and EL" Watch "PropertyResourceBundle and EL" New topic
Author

PropertyResourceBundle and EL

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Can the new EL access properties from a PropertiesResourceBundle stored in the ServletContext()?


GenRocket - Experts at Building Test Data
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

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
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Well, ResourceBundle objects won't work but Properties Objects work just fine.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: PropertyResourceBundle and EL