i have one bean that bean contains string and integer values setter and getter method i am writen the validations integer variables and string variables sucessfully. but i am entered the values in jsp form integer place string values entered that time 500 error is retrived. how to write the Integer text boxes allow the strings the time does not fire the 500 error. only Retrive the Error messageas. i am using Pattern and matcher classes.
...but i am entered the values in jsp form integer place string values entered that time 500 error is retrived.
It looks from your post that textfield require integer and if user enters String, 500 internal server errors at the server side.
From the textfield, the retrieved value will always be a string. You can use valueOf(String) method for validation. It returns you an Integer object. If it fails, you will get a NumberFormatException.
By parsing, you can filter illegal entered values.