Java-programs

SPRING MVC LOGIN FORM EXAMPLE PROJECT

In this project, we are going to see how to implement Spring MVC framework to make a login form that verifies entered username and password. If the username and password is correct then Success page is shown telling that user has successfully logged in, otherwise it will display a message that details are not correct.

HOW TO OPEN/ USE/ RUN THIS PROJECT ON NETBEANS?

If you want to run this (Spring MVC Form) whole project as it is on you local machine then after downloading this repository go to Netbeans IDE. From NetBeans ID > go to open project and then select folder named as “Spring6” (which you will find inside the zip file, (Java Programs > SpringMVCFormExample> Spring6) that you will download. After opening Spring6 in Netbeans you only need to deploy and run the project.

STEPS TO CREATE A NEW WEB APPLICATION WITH SPRING WEB MVC FRAMEOWORK IN NETBEANS

To create this project from scratch in Netbeans IDE follow the steps below:

Project Structure of this Project, “Spring6”

pic

Main Files of this project

OUTPUT OF THIS PROJECT

Form WebPage with correct details (Username and Password is swati and swati respectively, you can change it according to your choice in MyController.java)

pic

success.jsp page is displayed after correct details are submitted in form

pic

Form WebPage with WRONG details (Username and Password except swati and swati respectively are all wrong and will display error message)

pic

Error Message Displayed after submitting wrong login form details

pic

Libraries that are added in this project

pic