struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Corey Probst <>
Subject Re: Load message resources from DB???
Date Wed, 30 Mar 2005 03:11:38 GMT
> Even if I could just get some general directions on what method to pull the data in, and
what method to put the data into what type of container.
> Just something would be good.

I think I remember reading a post about this before.
Start by looking at the PropertyMessageResources source code,
specifically, the loadLocale and getMessage methods.  This is where
the properties are read from the file (for that implementation).  You
can probably extend that class and load the messages from a database
by overriding one of those methods (loadLocale).  You would also need
a method to clear the cache of messages when they are updated. (Be
careful in a clustered environment)

On second thought you can probably just extend MessageResources and
implement the getMessage method.

Hope that helps... even if it's just a little bit.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message