want pass the input text value for decimal format

I want pass the input text value for decimal format. but I got an error below code. can any one explain the error of the code.

DecimalFormat decimalformat = new DecimalFormat("#.00");

String dp = decimalformat.format(mf.getParameter("pprice"));

product.setPrice((Double.parseDouble(dp)));

java.lang.IllegalArgumentException: Cannot format given Object as a

Number at java.text.DecimalFormat.format(DecimalFormat.java:507) at

java.text.Format.format(Format.java:157) at

Servlet.product.save_product.doPost(save_product.java:66)

...

Read More »

By: StackOverFlow - Tuesday, 20 November

Related Posts