This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman 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 Building Microservices this week in the Design 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: 252
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: 9138
    
    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.


[How To Ask Questions On JavaRanch]
 
Have you checked out Aspose?
 
subject: Variable name substitution at property resource file
 
It's not a secret anymore!