This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Refreshing Message Resources from database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Refreshing Message Resources from database" Watch "Refreshing Message Resources from database" New topic

Refreshing Message Resources from database

pedro costa

Joined: Mar 24, 2011
Posts: 7
Good morning in my timezone.

I changed Struts framework to read the message resources from database instead from a file. I extended from MessageResourcesFactory and from MessageResources classes.In the end i configured the struts-config.xml file and replace the tag

Everything worked fine.My problem is related with the refresh of the message resources. I have build a ContextListener that puts a thread running , this thread makes the refresh. Now the question , how can i access my MessageResources class ? I now that inside an action i have a method that retrieves the resources getResources(HTTPRequest), but because i am running from an external class i do not have access to that method.At least i tried to use the MessageResources.getMessageResources("myResources") the input parameter used is equal to the parameter used in the
above. This method retrieves the MessageResources from Struts not my extended version that contains the refresh method.

Can anyone help me ? I am stuck with this one.

Thanks in advance

Best Regards
I agree. Here's the link:
subject: Refreshing Message Resources from database
Similar Threads
javax.servlet.jsp.JspException: Missing message for key "registration.text.ip"
Struts 1: Access MessageResources from doStartTag in TagSupport
How to access the request from an ActionServlet?
Getting values from properties in validate-using multiple message-resources in struts