I am new to JSP. I am doing a course. where they require me to build a registration page. and when we submit entries must be into database. So that when we log in the username and password must match then only welcome page should come otherwise error page. and also if we have 3 unsuccessful login attempt then account must be locked.
We have to use Mysql database for the same. Please provide a light on the same.

Please provide a light

On what specifically?

some guidelines for developing your actual requirement

  1. create a table with all your required columns + (1 column for checking login successful or not status)

  2. create 3 jsp pages like login.jsp, user_home.jsp, log_fail.jsp

  3. create 1 servlet file for processing your logic like loginServlet.java

in orderto fullfill your task you must need the above things firstly

happy coding

as radhakrishna.p have already said:
You have to create database with one extra field,in which you can count login fail attempt.

likewise you have to create 3 pages:
one login page that will match data from textbox to database.
one success page that will displays after username and passwords are matched.
one fail page/ fail msg that will displays after no records match with given username & password.
one block page/ block msg that will displays after 3 fail login attempt.

so go ahead..do it..

You also need to a login servlet filter to block any direct access of "user_home.jsp" .
Since access to "user_home.jsp" is allowed only if user passes validation on login.jsp.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.