I have Java object , which contains a property of double.
I am using Spring MVC. When attaching the Java Object (Model) to JSP page and rendering (ModelAndView) , It is displaying in scientific notation.
1.1980598E7
While, on the other hand, when returning the JSON object, double is displaying normally.
11980598
Please suggest. I want to display as normal value in both the cases.
Below didn't work for JSTL.
DecimalFormat df2 = new DecimalFormat(".##");
sampleDoubleValue =Double.valueOf(df2.format(sampleDoubleValue ));
Some one marked this question as Duplicate question. I would also like to know why It is working in JSON but not JSP. So please dont consider this as duplicate question unless until the previous question answers my question completely.