This is simple prototype of login module.
It support user-validation from database(Mysql) using JDBC.
Session Management is also implemented in it, so that people can not access restricted area directly using url.
Add below code in your pom.xml
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
For newest version go to Maven
To install it,Simply grab and Run it in Netbeans.
-
Create a new Java-Web Project in Netbeans with Your Favourite name.
-
In web folder of your project, You have index.jsp.This Folder will contain all of your front-end pages. Design all the pages and store here.
-
Create all servelet files ,You need. eg. I have here
-
Login.java
For User Authentication
-
Logout.java
To invalidate session of user
-
Dao.java
To connect with Database