tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject Re: Integer division question
Date Thu, 09 Sep 2004 11:22:57 GMT
Per the JSP 2.0 Spec., both operands have been coerced to Double and then the
"/" operator has been applied.

Quoting Pierre Scemla <pscemla@openpricer.com>:

> Hi,
> 
> I have the following el code in a jsp:
>     length="${fn:length(myCollection) / 2}"
> where length is an attribute of type String (I can't change it to 
> Integer, this is an attribute of the Struts's iterate tag).
> 
> As fn:length() returns an integer and as 2 is an integer, I was 
> expecting that the value for length would be "6" for instance,
> but I got "6.0".
> Is it an intended feature of the division operator of the jstl/el or is 
> it a bug?
> 
> Pierre

-- 
Kris Schneider <mailto:kris@dotech.com>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message