Gourav Das wrote:No sir , i have passed the name parameter via the url , check the code
Yes, you pass a "name" parameter. What you pass as the value of that parameter is far less obvious.
if i remove the Integer.parseInt() part the code runs successfully on my tomcat server.
Well, sure, if you remove the line of code which throws the exception, then that exception doesn't get thrown. You can count that as "runs successfully" if you like.
So its for sure that name is ="2" , but i dont understand whats the problem converting it to integer
No, it doesn't follow that it's "2". You have some JavaScript which may or may not send "2" as the value of the "name" parameter. I don't see anywhere in your JSP code where you verify that it's actually "2". All you did was to remove the code which demonstrates that it isn't.
Let me give you some advice about problem-solving: Declaring that a certain part of the code can't possibly be the cause of the problem is futile unless you demonstrate in a positive way that it isn't the cause of the problem. You haven't done that.