title: org.apache.jasper.JasperException: java.lang.NumberFormatException: null
body: <p>I got exception: <strong>org.apache.jasper.JasperException: java.lang.NumberFormatException: null</strong>
  when trying this code:</p>
  
  <pre><code>&lt;%@page contentType="text/html" pageEncoding="UTF-8"%&gt;
  &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd"&gt;
  
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
      &lt;title&gt;JSP Page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;h3&gt;Tanggal sekarang:&lt;/h3&gt;
      &lt;%= new java.util.Date() %&gt;
      &lt;% //begin scriplet
      String nama = request.getParameter( "namadepan" );
      String id = request.getParameter("idUser");
      int idInt = Integer.parseInt(id);
      if(nama!=null) {
  
      %&gt; &lt;%-- end scriplet to insert fixed template data --%&gt;
      &lt;h3&gt;Halo &lt;%= nama %&gt;, &lt;br/&gt;
          int idInt = Integer.parseInt(idUser);
          Selamat datang di web Koperasi Aneka Usaha!
          id anda :&lt;%=idInt %&gt;
          &lt;/h3&gt;
      &lt;% //continue scriptlet
      }//end if
      else {
      %&gt; &lt;%-- end scriplet to insert fixed template data --%&gt;
  &lt;form name="login" action="index.jsp" method="post"&gt;
  &lt;table width="200" border="1"&gt;
  &lt;tr&gt;
  &lt;td width="56"&gt;Nama &lt;/td&gt;
  &lt;td width="128"&gt;&lt;input type="text" name="namadepan"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;ID&lt;/td&gt;
  &lt;td&gt;&lt;input type="text" name="idUser"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Umur&lt;/td&gt;
  &lt;td&gt;&lt;input type=int name="umur"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td colspan="2"&gt;&lt;input type="submit" name="Submit" value="Submit"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/form&gt;
      &lt;% //continue scriptlet
      }//end else
      %&gt; &lt;%-- end scriplet --%&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>How to fix that exception? im sure the error is about convertint input type string (idUser) to integer.</p>