cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ray Martin" <>
Subject RE: problem in writing Actions
Date Wed, 18 Dec 2002 12:22:16 GMT
Ant is a great thing.  However, Ant is not an absolute 'must' to be able to
build actions.  There are four steps.  1) From your JAVA package directory
structure, run JAVAC on the action file(s).
2) Copy the resultant class(es) to the appropriate place.
3) Run JAR.
4) Copy the resultant jar file to the the cocoon/WEB-INF/lib directory.

Maybe this is actually a fifth step - stop and restart your web server,
hopefully Tomcat.

And yes, Ant can do those four steps very nicely for you - saving you the

  -----Original Message-----
  From: Sternath Elmar []
  Sent: Wednesday, December 18, 2002 5:34 AM
  To: ''
  Subject: AW: problem in writing Actions

  Hi Anna,

  the .java file has to be compiled into a class file. Cocoon then accesses
the class file to execute the desired functionality. For compilation, you
need an appropriate tool, for instance ant. I would recommend to get
familiar with ant. Ant provides functionality to compile .java files into
.class files, pack them into .jar libraries and deploy them into the target
directory of cocoon.

  -----Urspr?ngliche Nachricht-----
  Von: Anna Afonchenko []
  Gesendet: Mittwoch, 18. Dezember 2002 11:22
  An: cocoon-users
  Betreff: problem in writing Actions

    Hi all.
    I am exploring the action possibilities in Cocoon now, and I wanted to
test some actions.
    I took sample action class (from book "Cocoon:Building
XML Applications" by Langham & Ziegeler), changed the package name to ub,
and copied this file into ub directory under cocoon directory. Then I
declared it in a sitemap by adding
    <map:action name="random" src="ub.RandomAction"/>

    When I try to use it (even if I just call http://localhost:8080/cocoon/
and not the pattern match for this action), I get an error from Cocoon:
    type fatal

    message Error in sitemap configuration : ub.RandomAction

org.apache.avalon.framework.configuration.ConfigurationException: Error in
sitemap configuration : ub.RandomAction

    sender org.apache.cocoon.servlet.CocoonServlet

    source Cocoon servlet



    I tried to move the to the cocoon directory, it
doesn't help.

    What should I do and where should I put my own Action class in order to
use it in the sitemap?

    Thank you very much for help.


View raw message