In this article you will learn how you may design a simple Login form using JSP. We use the session for storing the users information.

Login.jsp page take input from user and submitted to server to further processing. Database has a MYSQL table name users. Users table is having number of fields like username and password which are using in login process.

Create a table in the database and name it as users

First select mysql database and create users tables. copy paste below query in sql tabs of phpmyadmin.

Add record in table

index.html page

jsp-login

source code

Login.jsp page

Home.jsp page

Logout Page logout.jsp

If you want to logout for current session. You can use the logout page where the session value for current username is removed.

Do you like & share this article with your friends, and follow us on Facebook and Twitter for more cool WordPress tutorials.