Simple Registration Application using JSP, Servlets and JDBC connectivity to MySQL

Article Index

1 1 1 1 1 1 1 1 1 1 Rating 3.64 (14 Votes)


  • Create a Registration Form to enter user name, password, first name, last name, email address, secret question, answer and register a new user to system.
  • Validate if the user name and password is not blank. Display error message to user, if either of them is blank.
  • Validate if the user name already exists and display an error message to the user
  • In the event of an error, ensure that registration form is displayed again with all prefilled information
  • On successful registration, set the user name in session and forward to home page.


  • MySQL and Tomcat is already installed
  • You have basic knowledge of MySQL to create tables and insert / update records
  • You have basic knowledge of Java and J2EE web applications
  • Have your favorite IDE for developing / reviewing code
  • This workshop adds the registration functionality to the previous article Simple Login Application. Reviewing that article prior to this article would help.


Concepts Covered

  • JDBC connectivity to MySQL from Servlet
  • Simple application of JSTL tag
  • Using request attribute and request parameters
  • Basic error handling concepts

NOTE: Don’t even think of using the code as is for a production environment Tongue Out
This is just for education purpose but you can take inspiration from this code.

Joomla SEO by MijoSEF