Skip to Content
Former Member
Apr 05, 2006 at 03:41 PM

Divide values returned to the JSP


I am trying to change a jsp page for ISA 4.0

I would like to divide the netValue by the Quantity on the order.jsp page. How do I divide the returned value from item.getNetValue with the value from item.getQuantity?

They code as it stands at the moment:

<% String Z_temp1 = item.getNetValue(); %>

<% String Z_temp2 = item.getQuantity(); %)

<% out.println(Z_temp1 / Z_temp2 ; %> will not work as they are strings.

The jsp will not work when I have Z_temp1 as an int, I think the method getNetValue only returns strings. Is there a method of casting the returned value?

Please help