A simple and modern Login Authentication System built using Java Servlets, JSP, and MySQL. This project demonstrates how frontend UI connects with backend logic and database validation.
- 🧑💻 User Login Form (Modern UI)
- 🔐 Authentication using MySQL Database
- ✅ Login Success Page
- ❌ Login Failed Page
- 🎨 Clean and Responsive UI
- 🔄 Servlet-based request handling
- Java (Servlets)
- JSP (Java Server Pages)
- JDBC (Database Connectivity)
- MySQL (Database)
- HTML + CSS (UI Design)
- Apache Tomcat (Server)
LoginApp/
│
├── src/
│ └── cscorner/
│ └── LoginServlet.java
│
├── WebContent/
│ ├── login.jsp
│ ├── welcome.jsp
│ ├── loginFailed.jsp
│
└── README.md
git clone https://github.com/your-username/java-servlet-login-system.git
- File → Import → Existing Projects
- Select project folder
- Add Tomcat server in Eclipse
- Run project on server
Run the following SQL queries:
CREATE DATABASE luiza;
USE luiza;
CREATE TABLE login (
uname VARCHAR(50),
password VARCHAR(50)
);
INSERT INTO login VALUES ('admin', '1234');Open LoginServlet.java and update:
Connection con = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/luiza",
"root",
"your_password"
);Open in browser:
http://localhost:8080/YourProjectName/login.jsp
- Login Page (Modern UI)
- Success Page (✔ Login Successful)
- Error Page (❌ Login Failed)
- 🔐 Password hashing for security
- 🧑 Session management
- 🚪 Logout functionality
- 📊 Dashboard page
- 🌙 Dark mode UI
Luiza Shaikh Java Developer (Fresher)
Give it a ⭐ on GitHub!