| Author |
Questions About Resource Bundles
|
Elle Atechsy
Ranch Hand
Joined: Jan 23, 2004
Posts: 96
|
|
Hi, I'm very new to Struts,as well as converting a Java MVC structured app into the Struts framework. And,in doing so, I am trying to convert a constants properties file into a messageResourceBundle file. My question is... How do I access the attributes in the resource file from a class file? Or am I just down right off the mark, and cannot use the resource file that way? It works when displaying a message from the resource file in a JSP page, but I can't figure out how to do it in a class file. I appreciate any help. Thanks, Lulu
|
 |
sreenath reddy
Ranch Hand
Joined: Sep 21, 2003
Posts: 415
|
|
Hi U can use the java.util.ResourceBundle will do the job for u ........but ofcourse if u want to access the resourcebundles of the struts ....it has a class named MessageResources which internally does the same job as java.util.ResourceBundle
|
 |
Elle Atechsy
Ranch Hand
Joined: Jan 23, 2004
Posts: 96
|
|
|
Thank you! It's working.
|
 |
 |
|
|
subject: Questions About Resource Bundles
|
|
|