This was for 1.0.x only.  It will (er...should) not work in 1.1

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://www.open-tools.org/struts-atlanta




> -----Original Message-----
> From: Joe Barefoot [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 18, 2002 6:44 PM
> To: Struts Users Mailing List
> Subject: RE: Dynamic configuration?
>
>
> I'm not sure that this is correct.  One of the standard classes
> shipped with Struts is AddMappingAction:
>
> public class AddMappingAction
> extends Action
>
> A standard Action that calls the addMapping() method of our
> controller servlet to add a new action mapping definition
> dynamically. The new definition replaces any existing definition
> for the same name. This action expects request parameters whose
> names match the properties of ActionMapping.
>
>
> This says to me that you can use a "skeleton" struts-config.xml
> file and add all your action-mappings "manually" at runtime if
> you so desire.  Someone correct me if this is wrong.
>
>
>
> peace,
> Joe
>
>
> > -----Original Message-----
> > From: Christopher Seekamp [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, September 18, 2002 3:36 PM
> > To: Struts Users Mailing List
> > Subject: Re: Dynamic configuration?
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Kevin:
> >
> > I think the answer is basically no.  The application configuration is
> > processed at initialization time and then "frozen".  Even if
> > you try to add
> > your own action mappings to the existing set of mappings in a
> > PlugIn you
> > can't do it because by the time the PlugIns run it is frozen.
> >  You could
> > create your own additional pool of configuration objects and
> > change the
> > request processing to use both pools, but that would be painful,
> > error-prone, and somewhat difficult.  What I ended up doing
> > was having my
> > initialization run first, then I  made a copy of the
> > struts-config.xml,
> > added my entries to that entry, and told Struts to initialize
> > with the new
> > one.
> >
> > Hope that helps.
> >
> > Chris Seekamp
> >
> >
> >
> >
> > |---------+---------------------------->
> > |         |           "Kevin Roast"    |
> > |         |           <kevin.roast@acti|
> > |         |           viti.com>        |
> > |         |                            |
> > |         |           09/18/2002 01:01 |
> > |         |           PM               |
> > |         |           Please respond to|
> > |         |           "Struts Users    |
> > |         |           Mailing List"    |
> > |         |                            |
> > |---------+---------------------------->
> >
> > >-------------------------------------------------------------
> > --------------------------------------------------------------
> > ------------------|
> >   |
> >
> >                     |
> >   |       To:       "Struts Users Mailing List"
> > <[EMAIL PROTECTED]>
> >                                   |
> >   |       cc:
> >
> >                     |
> >   |       Subject:  Dynamic configuration?
> >
> >                     |
> >   |
> >
> >                     |
> >   |
> >
> >                     |
> >
> > >-------------------------------------------------------------
> > --------------------------------------------------------------
> > ------------------|
> >
> >
> >
> > Hi,
> >
> >
> > Does anyone know if it's possible too add config elements to the
> > application configuration on the fly? The reason I ask is that the
> > application I am considering will probably NOT use the
> > struts-config.xml
> > for most forms - instead it will some kind of application definition
> > dynamically from a data-source. Therefore I will need to create
> > action-mappings config elements etc. when my application
> > initializes. Does
> > anyone know if this can be done?
> >
> >
> > Thanks,
> >
> >
> > Kevin
> > --
> > +44 (0)1628 589125
> > [EMAIL PROTECTED] --
> > To unsubscribe, e-mail:   <
> > mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: <
> > mailto:[EMAIL PROTECTED]>
> >
> >
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to