On 12/1/05 5:06 pm, "James Mitchell" <[EMAIL PROTECTED]> wrote:

> Well, this question is actually for the commons-chain (Jakarta Commons)
> mailing list.

I already sent a copy to the commons mailing list.

> 
> What version of chain are you using?  In looking thru the javadocs, that
> parameter is deprecated.

1.0. yes... but I looked at the source code and it was the only way to
create a Catalog on the ServletContext (but it will have no commands at
all!).
not specifying it will never load a catalog.

> 
> http://jakarta.apache.org/commons/chain/apidocs/org/apache/commons/chain/web/C
> hainListener.html
> 
> Have you tried specifying a different context init param?
> 
> For what you are doing, wouldn't
> org.apache.commons.chain.CONFIG_WEB_RESOURCE be the best bet?

yes, with the following configurations:

    <context-param>
        
<param-name>org.apache.commons.chain.CONFIG_WEB_RESOURCE</param-name>
        <param-value>chain-config.xml</param-value>
    </context-param>

and

    <context-param>
        
<param-name>org.apache.commons.chain.CONFIG_WEB_RESOURCE</param-name>
        <param-value>/WEB-INF/classes/chain-config.xml</param-value>
    </context-param>

the same result.

what is odd is that the digester doesn't parse anything and it doesn't
complain about anything either (?).

Pedro Salgado

> 
> 
> --
> James Mitchell
> Software Engineer / Open Source Evangelist
> EdgeTech, Inc.
> 678.910.8017
> AIM: jmitchtx
> 
> ----- Original Message -----
> From: "Pedro Salgado" <[EMAIL PROTECTED]>
> To: "Struts Users List" <struts-user@jakarta.apache.org>
> Sent: Wednesday, January 12, 2005 10:22 AM
> Subject: commons-chain problems
> 
> 
>> 
>>  I am trying to use commons-chain on my project but I have some problems
>> loading the chain-config.xml... does anyone setup a web application with
>> commons-chain (ChainListener)?
>> 
>>  If I specify org.apache.commons.chain.CONFIG_ATTR on my web.xml the
>> catalog is no longer null but it does not contain any commands.
>> 
>>  I have looked at the source code severall times and I don't know where is
>> the problem. Help?
>> 
>> 
>> 
>> 
>> 
>> I have appended a logger to commons-chain and commons-digester... here are
>> the results :
>> 
>> ** commons-chain log
>> 
>> 15:46:17,970 - INFO org.apache.commons.chain.web.ChainListener -
>> Initializing chain listener
>> 15:46:18,050 - DEBUG org.apache.commons.chain.web.ChainResources - Loading
>> chain config resource 'chain-config.xml'
>> 
>> 
>> ** commons-digester log
>> 
>> does not provide any information about commons-chain parse operation (?)
>> 
>> 
>> My configuration :
>> 
>> ** chain-config.xml (that is being copied to the WEB-INF/classes)
>> 
>> <?xml version="1.0" encoding="UTF-8" ?>
>> <catalogs>
>> 
>>    <catalog name="risks">
>> 
>> 
>>        <command
>>            name="viewRiskTypes"
>>            className="package.commands.ViewRiskTypes"/>
>> 
>>    </catalog>
>> 
>> </catalogs>
>> 
>> ** web.xml (Tomcat-5.0.27)
>> 
>> <context-param>
>>    <param-name>org.apache.commons.chain.CONFIG_CLASS_RESOURCE</param-name>
>>    <param-value>chain-config.xml</param-value>
>> </context-param>
>> 
>> <listener>
>>   <listener-class>
>>     org.apache.commons.chain.web.ChainListener
>>   </listener-class>
>> </listener>
>> 
>> 
>> Pedro Salgado
>> 
>> 
>> ---------------------------------------------------------------------
>> 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]


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

Reply via email to