hi,
im taking in an integer from the user and passing this to another jsp page and i was wondering how to detect if a user has entered a string or a double instead of an integer into this field.
ive tried using the pattern and matcher objects, but these dont work with integers.
ive also inserted the if statement, that checks to see if the user has entered a negative integer, into a try and catch but i still get the error:
thanks for your help
im taking in an integer from the user and passing this to another jsp page and i was wondering how to detect if a user has entered a string or a double instead of an integer into this field.
ive tried using the pattern and matcher objects, but these dont work with integers.
ive also inserted the if statement, that checks to see if the user has entered a negative integer, into a try and catch but i still get the error:
Code:
org.apache.jasper.JasperException: For input string: "sd"
thanks for your help