check the input null
<p>i've found this line of code got error if the input not an number</p>

<pre><code>int sum = Integer.parseInt(request.getParameter("sum"));
</code></pre>

<p>the error message is</p>

<pre><code>type Exception report

message

descriptionThe server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: java.lang.NumberFormatException: For input string: "a"
root cause

java.lang.NumberFormatException: For input string: "a"
</code></pre>

<p>how to handle the input if the input is a string or null?</p>

<p>thanks</p>
