> From: Jim [mailto:[EMAIL PROTECTED]]
>
> 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)

Change it to return an empty Map: return new HashMap();

>
> 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>

You don't need to do it. If you put your compiled classes into the
WEB-INF/classes or your JAR-files into the WEB-INF/lib then the servlet
container will load those classes automatically.

>
> 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

Check the source of your sitemap. Look in tomcat/work/ directory for
sitemap_xmap.java.

Konstantin

>
> 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]>

Reply via email to