Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 80861 invoked by uid 500); 7 Feb 2002 20:27:11 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 80849 invoked from network); 7 Feb 2002 20:27:11 -0000 Date: Thu, 7 Feb 2002 15:27:09 -0500 Mime-Version: 1.0 (Apple Message framework v480) Content-Type: text/plain; charset=US-ASCII; format=flowed Subject: Problem with Actions (C2) From: Andre Thenot To: cocoon-users@xml.apache.org Content-Transfer-Encoding: 7bit Message-Id: <0F904129-1C09-11D6-937A-0050E4D0604F@thenot.net> X-Mailer: Apple Mail (2.480) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, I've looked in the docs and in the archives but I can't find out why I'm having trouble with actions in Cocoon 2.0 (binary version). Here's what I did: 1. I created a HelloPoohAction.java, almost identical to the one in the "Creating and using actions" docs, except that I added import statements for Redirector and SourceResolver, and the act() method contains: Map sitemapParams = new HashMap(); sitemapParams.put("mySiteParamValue", "Eeyore"); Request request = (Request) objectModel.get(Constants.REQUEST_OBJECT); request.setAttribute("myname", "Tigger"); return sitemapParams; 2. I compiled this file and placed the class file into a sub-directory of WEB-INF/classes (to match the package). 3. I stopped Tomcat (4.0.1), and removed Cocoon's work directory (just in case anything was cached). 4. At the top of my sitemap, I have in the section: and my section looks like this: 5. I started Tomcat and pulled up the Cocoon welcome page. No problem here. I checked the logs and I have: DEBUG (2002-02-07) 14:58.41:890 [cocoon ] (/cocoon/welcome) HttpProcessor[8080][1]/ExcaliburComponentSelector: Adding com.newhomesdirect.web.HelloPoohAction for hello-pooh so I see it found my class. 6. In a web browser, I do a request for /cocoon/xsp/simple and get a Resource Not Found error. Again, I check the logs, and this time I see that it instantiated my class all right, and I even see the parameter values: DEBUG (2002-02-07) 15:01.07:982 [cocoon ] (/cocoon/xsp/simple) HttpProcessor[8080][1]/sitemap_xmap: Action hello-pooh DEBUG (2002-02-07) 15:01.07:983 [cocoon ] (/cocoon/xsp/simple) HttpProcessor[8080][1]/AbstractSitemap: Current Sitemap Parameters: PARAM: 'mySiteParamValue' VALUE: 'Eeyore' PARAM: '../1' VALUE: 'simple' PARAM: '../0' VALUE: 'xsp/simple' but right after that, I see: DEBUG (2002-02-07) 15:01.07:983 [cocoon ] (/cocoon/xsp/simple) HttpProcessor[8080][1]/sitemap_xmap: Source=docs/samples/xsp/{1}.xsp WARN (2002-02-07) 15:01.07:984 [cocoon ] (/cocoon/xsp/simple) HttpProcessor[8080][1]/AbstractSitemap: Substitute: value not found for 1 while evaluating docs/samples/xsp/{1}.xsp ...snip... DEBUG (2002-02-07) 15:01.07:989 [cocoon ] (/cocoon/xsp/simple) HttpProcessor[8080][1]/URLFactoryImpl: Making URL from file:/web/tomcat/webapps/cocoon/docs/samples/xsp/.xsp Which explains the error on the web browser. But why does the parameter "1" just disappear like that? If this is documented somewhere please throw me a URL; if not, does anyone have any suggestions? Thanks in advance! Andre. --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: