I want to read key/value pair to String object in action class.
I'm able to read it in jsp like <jsp:message key=form.msg>
but not in action class.
thanks in advance ..!
posted 7 years ago
You can use MessageResources to read the properties file in Action class. In execute method, you can give like this.. MessageResources msgResource = getResources(request); This will read the message resource file specified in struts-config.xml (<message-resources parameter="ApplicationResources"/>
Then you can use getMessage() method on MessageResources to fetch the messages.