You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beehive.apache.org by Michael Speer <ms...@motive.com> on 2007/05/17 16:36:22 UTC

Question on Struts-config Init Plugins and nested pageflows

We are trying to initialze some application components based on our
Pageflow / servlet init hooks to setup default values on business
services based on what is deployed.
 
It would appear in our nested pageflows we see the following ::

 
 
We have a initPlugin we are using in our struts-config
<plug-in className="com.xxx.ComponentInitPlugIn"/>
 
init() of the outer parent flow context  say / for that war 
    This uses the init-as deployment descriptor values and works fine()
( on Startup of the application )
 
but the nested pageflows init() that fire ours plugin  when they are
first accessed say /x/APageFlow.jpf  ( Not at startup )
 
1) is there a way to init using the weblogic.xml init-as values  b/c it
does not seem to be using those credentials in the nested case
 
2) is there a way force init to happen during deployment startup
 
 
 
Michael

Re: Question on Struts-config Init Plugins and nested pageflows

Posted by Carlin Rogers <ca...@gmail.com>.
Hi Michael,

The underlying Struts framework supports configuring the web
deployment descriptor for multiple application modules. NetUI is
designed to load the struts module config files when they are first
accessed as you noted. However, you could add multiple <init-param>
elements to the NetUI servlet configuration in the web.xml, like you
would in Struts. You could include the generated config file for your
nested page flow as well. I think the name just needs to start with
"config/". Note though that the config files are generated and depend
on the class package and name. So something like...

<init-param>
   <param-name>config</param-name>
   <param-value>/_pageflow/struts-config.xml</param-value>
</init-param>
<init-param>
   <param-name>config/nested</param-name>
   <param-value>/_pageflow/struts-config-nested.xml</param-value>
</init-param>
...

I assume you're using the strutsMerge attribute in the
@Jpf.Controller() to point to a config file with the plugin element so
that it gets merged into the generated struts config file for your
nested page flow. Then when the app is deployed the plugin will get
called for the config of the nested page flow.

I'm not familiar with the weblogic.xml init-as values. Probably better
to post to the weblogic forums for container specific information.

Kind regards,
Carlin

On 5/17/07, Michael Speer <ms...@motive.com> wrote:
> We are trying to initialze some application components based on our
> Pageflow / servlet init hooks to setup default values on business
> services based on what is deployed.
>
> It would appear in our nested pageflows we see the following ::
>
>
>
> We have a initPlugin we are using in our struts-config
> <plug-in className="com.xxx.ComponentInitPlugIn"/>
>
> init() of the outer parent flow context  say / for that war
>     This uses the init-as deployment descriptor values and works fine()
> ( on Startup of the application )
>
> but the nested pageflows init() that fire ours plugin  when they are
> first accessed say /x/APageFlow.jpf  ( Not at startup )
>
> 1) is there a way to init using the weblogic.xml init-as values  b/c it
> does not seem to be using those credentials in the nested case
>
> 2) is there a way force init to happen during deployment startup
>
>
>
> Michael
>