You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rakesh <ay...@india.com> on 2001/08/22 13:06:13 UTC
Re: caching
what would it take to make parts of the struts-config readable from a
database ?
Rakesh Ayilliath
(Software Engineer)
Synergy IT Innovations Pvt Ltd,
#196, 1st Floor, 9th Cross,
HMT Layout, RT Nagar
Bangalore 560032
ayilliath@india.com
----- Original Message -----
From: "Craig R. McClanahan" <cr...@apache.org>
To: "Struts User" <st...@jakarta.apache.org>
Sent: Wednesday, August 22, 2001 4:42 AM
Subject: Re: caching
>
>
> On Tue, 21 Aug 2001, David Corbin wrote:
>
> > Will Struts detect that the struts-configl.xml file has changed and
reload
> > it automatically?
> >
>
> Not at present.
>
> There is a standard action (org.apache.struts.actions.ReloadAction) that
> you can arrange to trigger when you know this has happened (if you
> configure it in your original struts-config.xml first :-), or you can use
> the application reload facilities of your servlet container.
>
> > Thanks.
> >
> >
>
> Craig
>
>
>
Re: caching
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Wed, 22 Aug 2001, Rakesh wrote:
> what would it take to make parts of the struts-config readable from a
> database ?
>
You would need to subclass ActionServlet and override the initMapping()
method (where struts-config.xml is actually parsed), and replace it with
appropriate functionality to configure the mappings (and so on) from your
database instead.
The rest of Struts does not care at all where these things were configured
from -- it only wants the collections that are made available as servlet
context attributes, so this is conceptually pretty straightforward -- just
iterate through rows in your database tables and configure objects like
ActionMapping instances, and call methods like addMapping() to register
them.
>
> Rakesh Ayilliath
> (Software Engineer)
>
Craig McClanahan