Return-Path: Delivered-To: apmail-cocoon-docs-archive@www.apache.org Received: (qmail 46196 invoked from network); 14 Feb 2006 23:09:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Feb 2006 23:09:54 -0000 Received: (qmail 62140 invoked by uid 500); 14 Feb 2006 23:09:54 -0000 Delivered-To: apmail-cocoon-docs-archive@cocoon.apache.org Received: (qmail 62116 invoked by uid 500); 14 Feb 2006 23:09:53 -0000 Mailing-List: contact docs-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: docs@cocoon.apache.org List-Id: Delivered-To: mailing list docs@cocoon.apache.org Received: (qmail 62105 invoked by uid 99); 14 Feb 2006 23:09:53 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Feb 2006 15:09:52 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id AE185DC for ; Wed, 15 Feb 2006 00:09:31 +0100 (CET) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki To: docs@cocoon.apache.org Date: Tue, 14 Feb 2006 23:09:31 -0000 Message-ID: <20060214230931.6315.4457@ajax.apache.org> Subject: [Cocoon Wiki] Update of "PerlScriptGenerator" by FosterHersey X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Dear Wiki user, You have subscribed to a wiki page or wiki category on "Cocoon Wiki" for change notification. The following page has been changed by FosterHersey: http://wiki.apache.org/cocoon/PerlScriptGenerator New page: === Download === Download the bsfperl.jar from [http://bsfperl.sourceforge.net] and put it into the WEB-INF/lib directory of your webapp. If you want to rebuild your Cocoon you should copy it also to the lib/local directory of your Cocoon sources, otherwise the JAR will be lost after the build. === Sitemap entry === {{{ }}} === Perl script (hello.pl) === {{{ use strict; # # a bean scripting framework object, # $bsf, is provided to us by bsfperl. # #get the output String buffer my $bsf_output = $bsf->lookupBean("output"); #get the Parameters object my $bsf_parameters = $bsf->lookupBean("parameters"); #get the value of the parameter "key" defined in the sitemap my $username = $bsf_parameters->getParameter("userName"); #generate xml $bsf_output->append("" . "Hello, " . $username . "!" . ""); }}} (tested with 2.1.8) === See Also === *PythonScriptGenerator *[http://cocoon.apache.org/2.1/userdocs/script-generator.html ScriptGenerator in Cocoon 2.1]