title: JSP Integer.parseInt
body: <p>I am trying to convert a String to Integer in JSP page. I get runtime errors while converting. <code>temp[0]</code> is perfectly displaying 5 when I remove the 2 lines under it. Here's my sample code:</p>
  
  <pre><code>&lt;%@ page import = "java.util.*"%&gt;
  &lt;%@ page import = "java.lang.*"%&gt;
  &lt;% String name = "5.ACC";
     String temp[] = name.split("\\.");
     out.println(temp[0]); 
     int id = Integer.parseInt(temp[0]);
     out.println(id);
  %&gt;
  </code></pre>