You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by go...@osmosis.gr on 2004/12/30 17:10:41 UTC

set variable in jx generator file

hi all

some hours before the new year i decide to take a look at jx generator
my qustion is if it's possible to have something like this

<jx:set var="path" value="${parameters.getParameter('contextPath')}+'myapp/'"/>

so the ${path} can be used after this set in the xml document?

regards

--stavros




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


RE: set variable in jx generator file

Posted by Adam Ratcliffe <ad...@mrigitech.com>.
Hi Stavros

Try this:

<jx:set var="path"
value="${cocoon.parameters.contextPath.concat('myapp/')}"/>

or alternatively you could use the '+' operator which is overloaded by the
Jexl expression language
to be used for String concatenation.

Jexl allows you to access bean properties using dot notation, the String
concatenation
expression needs to be contained within the curly brackets to be evaluated
by the parser.

Cheers
Adam

-----Original Message-----
From: gounis@osmosis.gr [mailto:gounis@osmosis.gr]
Sent: Friday, 31 December 2004 5:11 a.m.
To: users@cocoon.apache.org
Subject: set variable in jx generator file



hi all

some hours before the new year i decide to take a look at jx generator
my qustion is if it's possible to have something like this

<jx:set var="path"
value="${parameters.getParameter('contextPath')}+'myapp/'"/>

so the ${path} can be used after this set in the xml document?

regards

--stavros




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