Hi there.
I have a form where customers input numbers(both types like 123 and 123.54), and i need to pass this numbers to .jsp file and do some arithmetic operations with it.
So i have form.
here is piece of form's code:
-----------------------------------------------
<form name="form1" method="get" action="update.jsp">
<input type="text" name="price" size="30">
<input type="submit" name="submit" value="Submit">
</form
-----------------------------------------------
Next here is the piece of
jsp file code:
---------------------------------------------------------------
<%
//getting the parameter
String fprice = request.getParameter("price");
//converting parameter to double type
Double x = Double.valueOf(fprice)
// now i want to do some arithmetic
double y = x / 1.18;
%>
--------------------------------------------------------------
And i have error here:
org.apache.jasper.JasperException: Unable to compile C:\tomcat\work\DEFAULT\ROOT\ladu\update_12.java:96: Incompatible type for /. Can't convert java.lang.Double to double.
double y = x / 1.18;
Could any1 help me plz?
best regards...
[This message has been edited by Ilja Smoli (edited December 02, 2001).]