|
String to Integer Conversion in JSP
Hi,
I have a string. Iam trying to convert this to integer. But iam getting error message. Here iam displaying my code:
<%
int count;
String num=request.getParameter("numFields"); // this value coming from my textbox
out.println("num : "+num);
count = Integer.parseInt(num); // In this line error coming
out.println("Count : "+count);
//for (int x=0; x<count; x++)
//{
%>
Pleae help me.
Thanking you,
Vinith
|