posted 11 years ago
OK got the servlet working heres the scenario and the real problem
I am making a registration page which performs ajax validation on email to check its validity and availablility(from database). The form should not be submitted on click of submit button if email id is invalid Now the problem is that my ajax call is simply displaying valid email or invalid ,and i need it to return true or false so that i could pass this value to form in order to prevent its submission.
I am unable to return any value from servlet KEEPING IN MIND THAT MY PAGE SHOULDN'T REFRESH.(i used request dispatcher but it refreshes the page so setattribute and getattribute wont work here).
heres my jsp code(reginfo.jsp)
and heres my servlet (regajax4.java)