cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Lichtenberger <>
Subject REST / own Generator
Date Tue, 24 Nov 2009 22:16:30 GMT

I'm not sure if it's the right mailing list.

I've got a simple sitemap of the form:

    <!-- ~~~~~~~~~~~~~~~~ controller ~~~~~~~~~~~~~~~ -->
      <map:match pattern="gearth">
        <controller:call controller="rest-controller"
select="com.treetank.cocoon.controller.GoogleEarthController" />
      <map:match pattern="controller/screen">
        <map:generate type="gearth" />
        <map:serialize type="xml" />

My GoogleEarthController is very simple and looks like:

  public RestResponse doGet() throws Exception {
    final Map<String, Object> data = new HashMap<String, Object>();
    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? 


View raw message