commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james_strac...@yahoo.co.uk>
Subject Re: [Jelly] Concatenate variable values or strings
Date Wed, 29 Jan 2003 11:22:04 GMT
How about this?...

<j:set var="path" trim="true">
    default.jar;
    <j:forEach var="dep" items="${pom.dependencies}">
        ${dep.artifactId};
    </j:forEach>
<j:set>
<echo>${path}</echo>


James
-------
http://radio.weblogs.com/0112098/
----- Original Message -----
From: "Paul Libbrecht" <paul@activemath.org>
To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
Sent: Tuesday, January 28, 2003 3:54 PM
Subject: Re: [Jelly] Concatenate variable values or strings


You can certainly make more elegant things but I fear it would require
extensions of Jelly. One interesting thing would be to be able to
convert a list of XPath result-nodes into a string with appropriate
separators (presumably of any iterator convertible)... someone should
volunteer for such a tag in util.

Paul


Le Mardi, 28 janv 2003, à 11:14 Europe/Berlin, Rademacher Tobias a
écrit :
> I want to get a java classpath into a long string sepearted by ;.
> The path consists of all maven dependencies. Is there a easier/better
> way to
> concatenate the string than this:
>
> <j:set var="path" value="default.jar;"/>
> <j:forEach var="dep" items="${pom.dependencies}">
>   <j:set var="path" trim="true">
>     ${path}${dep.artifactId};
>   </j:set>
> </j:forEach>
> <echo>${path}</echo>
>
> I just want to write good jelly code. :-)
>
> Bye
> Toby
>
> --
> To unsubscribe, e-mail:
> <mailto:commons-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:commons-user-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:
<mailto:commons-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:commons-user-help@jakarta.apache.org>


Mime
View raw message