You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rajesh P <ra...@mphasis.com> on 2002/07/24 14:26:06 UTC

Urgent: Loading message resources from Database

Hi,
Can anybody give me the steps to fetch the message resources from a
database table rather than from a .properties file.
Please do help.
Thanks in advance,
Regards,
Rajesh

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Urgent: Loading message resources from Database

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Wed, 24 Jul 2002, Rajesh P wrote:

> Date: Wed, 24 Jul 2002 17:56:06 +0530
> From: Rajesh P <ra...@mphasis.com>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: struts-user@jakarta.apache.org
> Subject: Urgent: Loading message resources from Database
>
> Hi,
> Can anybody give me the steps to fetch the message resources from a
> database table rather than from a .properties file.
> Please do help.
> Thanks in advance,
> Regards,
> Rajesh
>

You would need to create your own implementation of the
org.apache.struts.util.MessageResources and
org.apache.struts.util.MessageResourcesFactory APIs, and then configure
Struts to use them.

Alternatively, if the message resources don't change while the application
is running, it would not be difficult to write a small utility program to
extract the appropriate information from the database, and write out the
properties files you need.  You could run this utility as part of the
process of assembling your WAR file prior to deployment, or whenever you
compiled all the Java source files.

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>