I have written the code to validate the email id, if the email id already exists an error message should be displayed saying "Email Id already exists".
I have written the code for checking from database. If the email id already exists in the database it is not storing once again but the error message is not displayed. How to solve the problem.
ResultSet rs=st.executeQuery("select emailid from registration where emailid='"+emailid+"'");
Again, please do not post the same question more than once. Raaja Gotluru addressed several issues in your code. It looks like you ignored him if you just post your question again without replying to him.