You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alberto Brosich <ab...@ogs.trieste.it> on 2007/09/05 11:18:36 UTC
jxtemplate doesn't read pipeline parameters
I have a strange problem with a really simple pipeline using jxtemplate
generator.
The pipeline is:
<map:match pattern="registereduser">
<map:generate type="jx" src="jx/login.jx">
<map:parameter name="username" value="{request-param:username}"/>
<map:parameter name="hostname" value="{request:remoteHost}"/>
</map:generate>
<map:serialize type="xml"/>
</map:match>
and the file login.jx is
<?xml version="1.0" encoding="UTF-8"?>
<jx:template xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
<authentication>
<ID>${cocoon.parameters['username']}</ID>
<data>${cocoon.parameters['hostname']}</data>
</authentication>
</jx:template>
I obtain always empty tags. I tried with fixed strings in the sitemap like
<map:parameter name="hostname" value="anystring"/>
and with different methods to access data in the jx file (JSTL and XPath
as I found in
http://wiki.apache.org/cocoon/JXTemplateGenerator?highlight=(jx)).
Accessing other cocoon objects (cocoon.request, for example) works right.
No useful information in the logs.
Cocoon version 2.1.10 on debian 4.0 with jdk 1.5.0_11.
Where is the mistake?
Thanks in advance
Alberto Brosich
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: jxtemplate doesn't read pipeline parameters
Posted by Alberto Brosich <ab...@ogs.trieste.it>.
Jeroen Reijn wrote:
> Hi Alberto,
>
> I'm not sure this is the case, but around 2.1.10 the jx template
> generator was replaced with a new version. Try using newjx as the name
> of your jxtemplate generator.
>
> Let me know if that sorts it out.
Yes!
It works!
Thanks
Alberto
>
> Kind regards,
>
> Jeroen Reijn
>
> Alberto Brosich wrote:
>> I have a strange problem with a really simple pipeline using jxtemplate
>> generator.
>>
>> The pipeline is:
>>
>> <map:match pattern="registereduser">
>> <map:generate type="jx" src="jx/login.jx">
>> <map:parameter name="username"
>> value="{request-param:username}"/>
>> <map:parameter name="hostname" value="{request:remoteHost}"/>
>> </map:generate>
>> <map:serialize type="xml"/>
>> </map:match>
>>
>> and the file login.jx is
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <jx:template xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
>>
>> <authentication>
>> <ID>${cocoon.parameters['username']}</ID>
>> <data>${cocoon.parameters['hostname']}</data>
>> </authentication>
>>
>> </jx:template>
>>
>>
>> I obtain always empty tags. I tried with fixed strings in the sitemap
>> like
>>
>> <map:parameter name="hostname" value="anystring"/>
>>
>> and with different methods to access data in the jx file (JSTL and XPath
>> as I found in
>> http://wiki.apache.org/cocoon/JXTemplateGenerator?highlight=(jx)).
>> Accessing other cocoon objects (cocoon.request, for example) works
>> right.
>>
>> No useful information in the logs.
>>
>> Cocoon version 2.1.10 on debian 4.0 with jdk 1.5.0_11.
>>
>> Where is the mistake?
>>
>> Thanks in advance
>>
>> Alberto Brosich
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: jxtemplate doesn't read pipeline parameters
Posted by Jeroen Reijn <j....@hippo.nl>.
Hi Alberto,
I'm not sure this is the case, but around 2.1.10 the jx template
generator was replaced with a new version. Try using newjx as the name
of your jxtemplate generator.
Let me know if that sorts it out.
Kind regards,
Jeroen Reijn
Alberto Brosich wrote:
> I have a strange problem with a really simple pipeline using jxtemplate
> generator.
>
> The pipeline is:
>
> <map:match pattern="registereduser">
> <map:generate type="jx" src="jx/login.jx">
> <map:parameter name="username" value="{request-param:username}"/>
> <map:parameter name="hostname" value="{request:remoteHost}"/>
> </map:generate>
> <map:serialize type="xml"/>
> </map:match>
>
> and the file login.jx is
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <jx:template xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
>
> <authentication>
> <ID>${cocoon.parameters['username']}</ID>
> <data>${cocoon.parameters['hostname']}</data>
> </authentication>
>
> </jx:template>
>
>
> I obtain always empty tags. I tried with fixed strings in the sitemap like
>
> <map:parameter name="hostname" value="anystring"/>
>
> and with different methods to access data in the jx file (JSTL and XPath
> as I found in
> http://wiki.apache.org/cocoon/JXTemplateGenerator?highlight=(jx)).
> Accessing other cocoon objects (cocoon.request, for example) works right.
>
> No useful information in the logs.
>
> Cocoon version 2.1.10 on debian 4.0 with jdk 1.5.0_11.
>
> Where is the mistake?
>
> Thanks in advance
>
> Alberto Brosich
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
--
Met vriendelijke groet,
Kind regards,
Jeroen Reijn
Hippo
Oosteinde 11
1017WT Amsterdam
The Netherlands
Tel +31 (0)20 5224466
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org