File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
    Bookmark Topic Watch Topic
  • New Topic
 
friki data migration
Ranch Hand
Posts: 772
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Is there a way to get Struts to reload the message resources files without restarting the server or the application?

The following solution was posted by Stefaan Huysentruyt in December of 2005:

Just subclass both PropertyMessageResources and PropertyMessageResourceFactory. Name them something like ReloadablePropertyMessageResources and ReloadablePropertyMessageResourcesFactory and configure them like this:



The sources:

ReloadablePropertyMessageResources.java



ReloadablePropertyMessageResourcesFactory.java



Just put some statement like this in an Action:



and voilĂ ...



Return to StrutsFaq
 
    Bookmark Topic Watch Topic
  • New Topic