i am getting age as a nt from a form.
but when i use
int age=request.getParameter("age");
as this it gives error.
i need to get age as a int.can't i do this directly without using any conversion?
If you look at the data on the wire there is zero information contained in a normal form submission to indicate what the type of the data is. HTML/HTTP have no concept of data types.
its right.. i will return only string and null if parameter wont found..
so be carefull while casting it to numeric data type because it will throw NullPointerException if you try to cast null value....