commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Nabbefeld <>
Subject Re: [Jelly/Jexl] How to add two int values?
Date Sun, 01 Aug 2004 13:13:10 GMT
I've asked to add two int values. Here's some of the code (I've tried 
different versions - without success):

<j:forEach var="line" items="${pluginIncludeTags}">
   <echo>line = ${line}</echo>
   <j:set var="_cpos" value="${line.indexOf(':')}"/>
   <!-- j:invokeStatic var="_cpos" className="java.lang.Integer" 
     <j:arg type="java.lang.String" value="${line.indexOf(':')}"/>
   </j:invokeStatic -->
   <!-- j:set var="_pos" 
value="${java.lang.Integer.parseInt(line.substring(0, _cpos))}"/ -->
   <j:invokeStatic var="_pos" className="java.lang.Integer" 
     <j:arg type="java.lang.String" value="${line.substring(0, _cpos)}"/>
   <j:set var="_lineDir" value="${line.substring(_cpos, _cpos + _pos)}"/>
   <!-- j:invoke var="_lineDir" method="substring" on="${line}">
     <j:arg type="int" value="${_cpos)}"/>
     <j:arg type="int"><j:expr value="_cpos + _pos"/></j:arg>
   </j:invoke -->


Dion Gillard schrieb:

> What types are x and y?
> On Sun, 01 Aug 2004 14:27:08 +0200, Peter Nabbefeld
> <> wrote:
>>I'm trying to write a Jelly script for Maven. I've tried "${x + y}" and
>>"${x} + ${y}" as the value argument, both don't work for me. I don't
>>know, if this is a problem with the archaic versions, Maven uses (e.g.
>>ant 1.5.3), or if it is a problem with Jelly/Jexl. If it is a solved
>>problem, please give me the right syntax, so I can file a bug for Maven.
>>Kind regards
>>Peter Nabbefeld
>>To unsubscribe, e-mail:
>>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message