title: String to Float: NumberFormatException
body: <p>I'm using jsp for storing dvds into a database</p>
  
  <p>For price I chose to use float.
  In the form I use the next approach:</p>
  
  <pre><code>&lt;form method="POST"&gt;
  ...
    &lt;td&gt;
        &lt;input type="text" name="dvdprice"/&gt;
    &lt;/td&gt;
  ...
  &lt;input type="submit" name="submit" value="Submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>When trying to convert it from string to float I use this</p>
  
  <pre><code>String price = request.getParameter("dvdprice");
  ...
  Float.valueOf(price)
  </code></pre>
  
  <p>And I get this exception:</p>
  
  <pre><code>SEVERE:   java.lang.NumberFormatException: For input string: "9.99"
  at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
  at java.lang.Integer.parseInt(Integer.java:492)
  at java.lang.Integer.valueOf(Integer.java:582)
  ...
  </code></pre>
  
  <p>I've searched for this problem all over the place but I couldn't find a solution..
  I used this technique to convert the numbers millions of times and I'm not sure why isn't working right now...</p>
  
  <p>Any help? </p>