Click to See Complete Forum and Search --> : how to place error msg in same page using jsp and controller as servlet


yesprakash
08-23-2008, 12:37 AM
I got problem when i design page as jsp in that user id is unique, if user alredy exsit then how to display error in that same page while database connecting and all those things are in servlet. my problem is automatically send to next page.

Khalid Ali
08-23-2008, 07:05 AM
well you must have a configuration some where in your code or configuration files where you are directing to next page, just make sure that its pointing to its current page.

yesprakash
08-26-2008, 05:43 AM
Thanks for ur reply...

I haven't idea for how display the error messages in the same jsp file. for an example in a regisration form, the username already in the database, it must show user already exist in the form jsp's top.

The username validation i did in servlet file, if the username already exists, the page will be redirect to form.jsp and show the error msg with in the field value, the other fields value not be reset ie given the fields are as it is.

Thanks
yesprakash