On 9/26/06, Mark Shifman <[EMAIL PROTECTED]> wrote:
HI; I am starting to play with chains and commands in 1.3.5 and I was wondering where I initialize the my custom chains ? I don't want to mess with the request processor, just add a few command chains of my own.
...
Do I need to extract the chain-config.xml from the struts-core.jar and include it in my WEB-INF along with my custom-chain-config.xml or is struts smart enough to configure itself without me extracting it and then create my custom catalog?
Yes, Struts will find its default Chain config file inside the jar. Even if you did need to specify it, you would not need to extract it from the jar. For example, you can use the provided chain config for Tiles (in an init param for the Action servlet): <init-param> <param-name>chainConfig</param-name> <param-value>org/apache/struts/tiles/chain-config.xml</param-value> </init-param> and it will be loaded from the struts-tiles.jar. Your context param and ChainListener should work fine. I think (but have not verified) that you can also use the chainConfig init param for ActionServlet to load your own catalogs. If you do that, you'll probably have to specify the default file in addition to your own files. The path to the default file should be 'org/apache/struts/chain/chain-config.xml'. -- Wendy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]