https://issues.apache.org/bugzilla/show_bug.cgi?id=51507
Bug #: 51507
Summary: NumberFormatNotFoundException:null
Product: Tomcat 6
Version: 6.0.32
Platform: PC
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
Created attachment 27284
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27284
the bug is present n this java application
when i try to execute a servlet on tomcat it gives this error
my servlet code is:
import javax.servlet.*;
import java.io.*;
public class AdditionServlet extends GenericServlet
{
public void service(ServletRequest request,ServletResponse response)
{
try
{
String a=request.getParameter("t1");
String b=request.getParameter("t2");
int n1=Integer.parseInt(a);
int n2=Integer.parseInt(b);
int sum=n1+n2;
response.setContentType("text/html");
PrintWriter out=response.getWriter();
out.println("<html><body bgcolor=cyan>");
out.println("<h1>the sum of the two numbers is: "+sum+"</h1>");
out.println("</body></html>");
out.close();}
catch(NumberFormatException e)
{
System.out.println(e);
}
catch(IOException e)
{
System.out.println(e);
}
}
}
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]