I am using java.text.MessageFormatto replace place holders in a template that displays price per unit. Following is the piece of code that does it.
java.text.MessageFormat