i am buliding a website as my mini project.
problem: when i submit registration form, if the username or email or even both already exist, I have writen the code to check if either of them exist in the database.. and that is working great..
and if the user still submits the form, i redirect the page to some other page where i notify the user for error.. It works great, i show up a div using jquery which displays error on top of everything on the page..
however on refresh, i would again, notify for submitting the form, and if i click on yes, it would display the same information..
i need a mechanism, where i could atleast stop submitting the form on refresh ..
i tried redirecting from servlet instead of request dispatcher, but that would create more flaws in my code,..
please suggest a solution!!!