You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Fleischer Roman <ro...@siemens.com> on 2003/10/31 11:54:23 UTC

double request-params when using request generator with cinclude

Hello,

maybe somebody can help me with my crazy effect which i have with the
version 2.1 of cocoon (the effect is present with Jetty 4.2.9 and Tomcat
4.1.27 too)
When i use a request generator more than once (in a cicnclude a matcher also
use a request generator), i get double parameters.

A service causes an error like
Cannon call catalog
http://server1.de/getCatalog&amp;catalog=5%205&lang=de%20de

Where come the request parameters 5%205 and de%20de from? It seems that they
are paste double in the request. When i look to the logfile i see indeed
...
<h:requestParameters>
<h:parameter name="catalog">
<h:value>5</h:value>
<h:value>5</h:value>
</h:parameter>
<h:parameter name="lang">
<h:value>de</h:value>
<h:value>de</h:value>
</h:parameter>
...

Description of my calls following:

I call an url like: http:/127.0.0.1/cocoon/model?lang=de&catalog=5
the matcher for model looks
<map:match pattern="model">
	<map:act type="session">
	<map:generate type="request"/>
	<map:act type="session-add">
		<map:parameter name="current_lang"
value="{request-param:lang}"/>
		<map:parameter name="navigationWidth"
value="{request-param:navigationWidth}"/>
	</map:act>
	<map:transform type="xslt" src="model.xsl"/>
	<map:transform type="cinclude">
	<map:serialize type="html"/>
	</map:act>
</map:match>

in model.xsl i use a cinclude for a navigation
<cinclude:include
src="cocoon:/navMenu?catalog={$catalog}&amp;lang={$lang}"/>

the macher for navMenu looks
<map:match pattern="navMenu">
	<map:act type="session">
	<map:generate type="request"/>
	<map:act type="session-add">
		<map:parameter name="current_catalogId"
value="{request-param:catalogId}"/>
		<map:parameter name="current_langId"
value="{request-param:lang}"/>
	</map:act>
	<map:transform src="navmodelNew.xsl"/>
	<map:transform type="cinclude"/>
	<map:transform type="session"/>
	<map:serialize type="html"/>
</map:act>
</map:match>

in navnodelNew i also use a cinclude to collect the catalogData
<cinclude:cached-include
src="cocoon:/smallCatalogIncl?catalog={$catalog}&amp;lang={$lang}"/>
whereas the variables are defined:
<xsl:variable name="catalog"
select="request:requestParameters/request:parameter[@name='catalog']/request
:value/text()"/>
<xsl:variable name="lang"
select="request:requestParameters/request:parameter[@name='lang']/request:va
lue/text()"/>

the smallCatalog is a simple machter which only call a service
<map:match pattern="smallCatalog">
	<map:generate
src="cocoon:/catalog?catalogId={request-param:catalogId}&amp;lang={request-p
aram:lang}" type="file"/>
	<map:<map:transform src="smallCatalog.xsl"/>
	<map:serialize type="xml"/>
</map:match>
<map:match pattern="catalog">
	<map:generate
src="http://server1.de/getCatalog&amp;catalog={request-param:catalog}&amp;la
ng={request-param:lang}"/>
	<map:serialize type="xml"/>
</map:match>

This service cause the error...
 
Does anybody know a solution, or can help?
Thanks
Roman
 

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