I am in the process internationalising my Struts application. In my application some of the messages to the user comes from java classes. I have hardcoded the messages. Can any one please tell me how to access keys from ApplicationResources.properties file in my java classes?
Any kind of help or hint is very much appreciated.
As my application application is almost completed i can't go for tiles at this stage.
Can you please suggest me some other way to access application resources in html tags especially assigning values to the buttons?
posted 15 years ago
In such case, the simply way is, as the controller knows how to prepare a view bean, you can let it read those values from the property file, and then put into the request scope. Thus, in your JSP, you can get the value of the button via the key in the scope.
It is a bit inconvenience, but it seems the fastest way you could do.