Can anybody help me how to solve the numberformatexception..
I have a form in which i have different types of field.One of them is to input the number in the textfield.
After i submit the form,I get that value using the following code in anothor
jsp page.
String totalpages = request.getParameter("totalpage");
int totalpage = Integer.parseInt(totalpages);
But the problem is that,when i leave this textbox empty without entering any value and submit the form,i get the numberformat exception because of the empty string "".How to parse this one?