cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "C. Gaffga" <cgaf...@triplemind.com>
Subject [C2] Problem using request parameters
Date Fri, 13 Jul 2001 17:10:13 GMT
Hi !

Is it possible to use the same context for all parts of a processing
pipeline.
I want to use the request parameters in the parts of aggregate.xml, but it
doesn't work.
I thought that is for what the cocoon: protocol is for, isn't it?

How can I use the request in all XSP files? I want it also to be used in a
dynamicly generated XSL file.

Is that possible in cocoon2.
I'm using cocoon2.1-dev (12.7.2001)

Christoph Gaffga

----------------
>From my sitemap:

<map:match pattern="request.xml">
  <map:generate type="serverpages" src="request.xsp"/>
  <map:serialize type="xml"/>
</map:match>

<map:match pattern="aggregate.xml">
  <map:aggregate element="page">
    <map:part src="cocoon:/request.xml" element="a"/>
    <map:part src="cocoon:/request.xml" element="b"/>
  </map:aggregate>
  <map:serialize type="xml"/>
</map:match>


request.xsp:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsp:page language="java" xmlns:xsp="http://apache.org/xsp">
<request>
  <xsp:logic>
    java.util.Enumeration x = request.getParameterNames();
    while(x.hasMoreElements()) {
      String s = (String) x.nextElement();
      <parameter>
        <name>
          <xsp:expr>s</xsp:expr>
        </name><value>
          <xsp:expr>request.getParameter(s)</xsp:expr>
        </value>
      </parameter>
    }
  </xsp:logic>
</request>
</xsp:page>







---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message