This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Struts and the fly likes Variable name substitution at property resource file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Variable name substitution at property resource file" Watch "Variable name substitution at property resource file" New topic
Author

Variable name substitution at property resource file

albert kao
Ranch Hand

Joined: Feb 04, 2010
Posts: 249
I like to do variable name substitution at the property resource file.
I had tried this:
Resource property file:


Jsp file:


The browser display the desired message properly.
i.e.
"What is the name?" is displayed properly.
However, there was runtime error at the weblogic console:


Please help.
Thanks.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8935
    
    9

I don't think MessageFormat or Properties does that sophisticated of substitution. Usually one provides a place holder in a String and provide MessageFormat with both the String and the value for the place holder.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
wood burning stoves
 
subject: Variable name substitution at property resource file