The example you provided only declares the actions. In order
to use them you have to use them in you pipelines using
the <map:act> or using the cocoon-action request parameter
(check the action user docs).

Also, examin your generated sitemap java file sitemap_xmap.java
probably in your appservers WEB-INF/work directory.

Returning null from an action means that that action failed,
you might want to return an empty Map instead.

Artur....

> -----Original Message-----
> From: Jim [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 27, 2002 2:31 PM
> To: [EMAIL PROTECTED]
> Subject: cocoon actions
> 
> 
> Hi,
> 
> I'm new to cocoon, and I'm having a few difficulties with actions.
> 
> I've tried writing the sample HelloWorld action, but I'm not sure what to do
> with it.  I'm able to compile it, but where do I put it?  I modified the
> code slightly - making it part of a package I call 'Security' and commenting
> out the body of the method (except for a return null;).  I'm trying to make
> a skeleton I can work from.  (And Security-related actions are what I'll be
> working on to start). 
> 
> I put it in the cocoon/WEB-INF/classes/Security subdirectory, and I added
> the following to WEB-INF/web.xml:
> 
> <init-param>
>         <param-name>Addons</param-name>
>         <param-value>WEB-INF/classes</param-name>
> </init-param>
> 
> Of course, I also modified my sitemap appropriately:
> <map:actions>
>      <map:action name="form"
> src="org.apache.cocoon.acting.FormValidatorAction"/>
>      <map:action name="login" src="Security.LoginAction"/>
>  </map:actions>
> ...
> <map:action-sets>
>  <map:action-set name="login-actions">
>   <map:act type="form"/>
>   <map:act type="login"/>
>  </map:action-set>
> </map:action-sets>
> 
> If it helps, here is a portion of the error I'm getting:
> 
> org.apache.cocoon.components.language.LanguageException: Error compiling
> sitemap_xmap: Line 602, column 19: variable action_set_login not found in
> class org.apache.cocoon.www.inv.sitemap_xmap Line 602, column 36: method
> actions
> 
> Thanks in advance,
> Jim Vlasblom
> 
> 
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

Reply via email to