I am reading a struts2 tutorial on the following url.
http://struts.apache.org/2.2.1/docs/message-resource-files.html
it explains how to read a value of a property key in a view file, but it doesn’t explain how to read property values in an action class or in a model class.
How do I read a value of a property key in an action or a model class?
Use the method
ActionSupport.getText(String). For example :messages.properties
struts.xml
Action class
For classes not extending
ActionSupport, use the following (during run time of Struts2) :