cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andres, Judith" <judith.and...@rauser-ag.com>
Subject AW: Reading request parameters
Date Fri, 17 May 2002 13:43:50 GMT
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:eg@goa.to]
> 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: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>

---------------------------------------------------------------------
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