cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <>
Subject Re: Parameters for Actions
Date Wed, 06 Nov 2002 12:47:22 GMT
On Wed, 2002-11-06 at 11:50, Ludovic de Beaurepaire wrote:
> Hi All,
> I don't find in documentation how to pass to an Action some parameters
> defined in one of the configuration files (web.xml, cocoon.xconf or
> sitemap.xmap). Someone knows ?

the parameters given in the sitemap to the action, such as in:

<map:act type="myaction">
  <map:parameter name="foo" value="bar"/>

are passed as a "par" argument in the act method of the Action.

Parameters (or actually "configurations") defined in de cocoon.xconf
can't be read directly by actions, since those are used to configure
specific components to which those configurations map (via the roles
file, see the avalon documentation for how that works).

Init parameters declared in the web.xml should be accessible through the
standard servlet interfaces, thus in your action you would do something
(objectModel is an argument supplied in the act method)

Configuration for the action specified inside the component declaration
in the map:actions element, such as in:

   <map:action name="foo" src="">

are accessible by implementing the "Configurable" interface (from
Avalon) in your Action. (this is again described in the Avalon

Bruno Dumon                   
Outerthought - Open Source, Java & XML Competence Support Center

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message