On Wed, 30 Mar 2005 09:02:52 -0300, Vinicius Caldeira Carvalho <[EMAIL PROTECTED]> wrote: > Martin Cooper wrote: > > >On Tue, 29 Mar 2005 18:33:49 -0300, Vinicius Caldeira Carvalho > ><[EMAIL PROTECTED]> wrote: > > > > > >>Hello there! I'm trying to use commons chains on my project. Here's a > >>piece of my web.xml: > >> > >><context-param> > >> <param-name>org.apache.commons.chain.CONFIG_CLASS_RESOURCE</param-name> > >> <param-value>catalog.xml</param-value> > >></context-param> > >> > >><listener> > >> > >><listener-class>org.apache.commons.chain.web.ChainListener</listener-class> > >></listener> > >> > >>My catalog.xml is located inside web-inf/classes > >> > >>here's how it looks like: > >> > >><chains> > >> > >> > > > >This is the problem. There is no <chains> element; you want <catalog> > >instead. > > > >(It seems there is a bug in the cookbook where it uses <chains>. I > >will fix that.) > > > >-- > >Martin Cooper > > > > > > > > > >> <chain name="validarRegraCompraPlanoCobertura"> > >> <command > >>className="com.araujo.convenios.view.administrarregracompra.action.commands.InitSalvarRegraCompraCommand"/> > >> <command > >>className="com.araujo.convenios.view.administrarregracompra.action.commands.RemoveItensCommand"/> > >> > >> <command > >>className="com.araujo.convenios.view.administrarregracompra.action.commands.AssembleUpdateRegraCompraCommand"/> > >> </chain> > >></chains> > >> > >>Ok. So I start my app on jboss 4.0.1. It outputs: > >> > >>18:26:18,470 INFO [ChainListener] Initializing chain listener > >>18:26:18,720 WARN [Digester] Empty stack (returning null) > >> > >>Well, so I guess It wasn't able to load the catalog right? When trying > >>to load the catalog from webcontext it returns null. Any ideas please? > >> > >>Best regards > >> > >>Vinicius > >> > >>--------------------------------------------------------------------- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > >> > >> > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > Well, sorry there were a chains element, it wasnt cut and pasted sorry > I figure out the problem after looking at the source code. There's a > "bug" with the chains. > On the cookbook it says you don't need to declare the name which your > catalog will be stored on the servlet context. But, if you don't it > won't store it (I saw the code) So I added : > <context-param> > <param-name>org.apache.commons.chain.CONFIG_ATTR</param-name> > <param-value>catalog</param-value> > </context-param> > to my web.xml and it started working. > I though one would be interested in knowing this ;)
Thanks. I've checked in a fix to the cookbook that will show up the next time the site is refreshed. -- Martin Cooper > Regards > > Vinicius > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]