Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 43632 invoked from network); 25 Nov 2009 05:38:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Nov 2009 05:38:43 -0000 Received: (qmail 12906 invoked by uid 500); 25 Nov 2009 05:38:43 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 12605 invoked by uid 500); 25 Nov 2009 05:38:41 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 12597 invoked by uid 99); 25 Nov 2009 05:38:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Nov 2009 05:38:40 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [195.130.137.66] (HELO brigitte.telenet-ops.be) (195.130.137.66) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Nov 2009 05:38:37 +0000 Received: from [192.168.1.2] ([84.196.131.152]) by brigitte.telenet-ops.be with bizsmtp id 9HeF1d0043HSA580GHeFUD; Wed, 25 Nov 2009 06:38:15 +0100 Subject: Re: REST / own Generator From: Jos Snellings To: dev@cocoon.apache.org In-Reply-To: <1259102133.2793.46.camel@luna> References: <1259102133.2793.46.camel@luna> Content-Type: text/plain; charset="UTF-8" Organization: Upperware GmbH Date: Wed, 25 Nov 2009 06:38:15 +0100 Message-ID: <1259127495.2706.8.camel@joske-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Hi Johannes, Supposing your url is : gearth/parameter1?rp=parameter2 Get a sitemap parameter: match="gearth/{mGearth}" In your controller code you can declare a variable to be a sitemap parameter by annotatino: @SitemapParameter private String mGearth; And for a simple request parameter this provides you with the request: @Inject private HttpServletRequest request; upon which things are like the old days: parameter2_value = request.getParameter("rp"); That should work. Good luck, Jos On Tue, 2009-11-24 at 23:35 +0100, Johannes Lichtenberger wrote: > Hello, > > I'm not sure if it's the right mailing list. > > I've got a simple sitemap of the form: > > > > > select="com.treetank.cocoon.controller.GoogleEarthController" /> > > > > > > > > My GoogleEarthController is very simple and looks like: > > ... > @Override > public RestResponse doGet() throws Exception { > final Map data = new HashMap(); > > data.put("mGEarth", mGEarth); > data.put("reqparam", reqparam); > > return new Page("servlet:/controller/screen", data); > } > ... > > The only thing it should do is getting the sitemap parameter mGEarth and > the request parameters (which I then will process in the Generator with > a StringTokenizer...). So how do I get access to the "data"-HashMap in > my Generator? > > greetings, > Johannes > > >