I understand that usually we use Do post, if our html form action is post, and then use Do get and redirect it to another html page.
What I would like to know is that before the redirect page is being processed, I would like the servlet to display a message to say register successful or not successful, due to duplicated ID or email.
Hope someone can advise me about how to enable the servlet to do the display before the servlet do the redirecting.
If that's what you want, then you don't redirect to the other HTML page. You output HTML which tells the user whether registration was successful. This HTML should include a header which tells the browser to redirect after (say) 15 seconds: