It is unlikely that you need to use the ChainListener in a Struts
1.3.xapplication.

First, you can have the ActionServlet instantiate all of your command
catalogs by specifying the servlet init parameter "chainConfig" with a
comma-separated list of classpath or servlet resources.  Remember that if
you manually provide this property, you must be sure to include the default
Struts chain ("org/apache/struts/chain/chain-config.xml") or one which
establishes an alternate processing chain, in addition to any of your own
which are used purely for per-request custom mappings.

Once you've done that, you can use the catalog and command attributes of an
action to cause Struts to invoke that command for a request instead of, or
in addition to an action.  (The command will be executed first if you
specify both a command and a "type".)

You can count on your commands used in an action mapping being invoked with
a Context which is actually a subclass of ActionContext and use that to
access the request/response/mapping/form and the like which would be passed
in to an Action's "execute" method.

Please note that I don't think a whole lot of people have been using this
feature, so you may well find bugs or even simply find that it could use
some refinements.  But this is the basic overview of how it's supposed to
work.

I hope this helps.

Joe


On 1/19/07, manunixx <[EMAIL PROTECTED]> wrote:


hallo guys!
I spent a lot of time trying to retrive a catalog from a struts action but
i
didn't get results! :(
Following the guidelines found in the jakarta commonsChain, I did this:

defining a catalog.xml <catalog>...</catalog>
adding a ChainListener to web.xml
defining a parameter org.apache.commons.chain.CONFIG_CLASS_RESOURCE to
tell
the listener where to locate the catalog.xml

trying to retrive the catalog parsed from an action by doing:

Catalog catalog = CatalogFactory.getInstance().getCatalog(); // this
return
null

Question: do I have to config a CatalogFactory before?

can anyone suggest me any reference or updated documentation regarding
struts action and common chain?

I saw that action mapping in struts-config.xml do accepts parameters
"catalog and command".
Do I have to use these to interact with commands?

Please halp me, I'm getting Nuts!
Emanuele.

--
View this message in context:
http://www.nabble.com/combining-chain-of-commands-with-struts-action-tf3039447.html#a8447680
Sent from the Struts - User mailing list archive at Nabble.com.


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




--
Joe Germuska
[EMAIL PROTECTED] * http://blog.germuska.com

"The truth is that we learned from João forever to be out of tune."
-- Caetano Veloso

Reply via email to