Hi,

I would recommend using the RequestParamAction (in org.apache.cocoon.acting)
        
        First, you have to make the action known to the sitemap somewhere in
the <map:actions> tag
        <map:action name="request"
src="org.apache.cocoon.acting.RequestParamAction"

        Then you can use it:

         <map:match pattern="test">
              <map:act type="request">
                <map:parameter name="parameters" value="true"/>
                  <map:generate src="{par1}.xml" />
                <map:transform src="{par2}.xsl" />
                  <map:serialize />
              </map:act>
           </map:match>

        Judith


> -----Ursprüngliche Nachricht-----
> Von:  Enrico Gulfi [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Freitag, 17. Mai 2002 15:31
> An:   Cocoon Mail List
> Betreff:      Reading request parameters
> 
> Hi everybody,
> 
> I'm new to Cocoon so forgive me if my problem seems trivial to you :-) I'm
> using C2 with Tomcat 4.0.3 on Win2000.
> 
> I'm trying to pass a request parameter to a transformation as following:
> 
>    <map:match pattern="test?par1=*&par2=*">
>       <map:generate src="{1}.xml" />
>       <map:transform src="{2}.xsl" />
>       <map:serialize />
>    </map:match>
> 
> As soon as I request a page, in the Cocoon servlet I get the following
> org.xml.sax.SAXParseException:
> 
> "The reference to entity "par2" must end with the ';' delimiter".
> 
> In other words, the ampersand is looked at as a starting entity... I tried
> with a backslash in front of &, but nothing changes.
> 
> So my basic question is: how do I extract and pass request parameter
> values?
> 
> Thanks a lot,
> 
> Enrico
> 
> 
> ---------------------------------------------------------------------
> 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: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>

---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to