A robust, production-grade Authentication System built from scratch using the Model-View-Controller (MVC) architecture.
This project demonstrates a deep understanding of core Java web technologies by implementing secure login, registration, and session management without high-level frameworks like Spring Boot. It features raw JDBC connectivity, SHA-256 password hashing, and professional logging.
- 🏗️ MVC Architecture: Clean separation of concerns (Model, View, Controller).
- 🔒 Security: Passwords are hashed using SHA-256 before storage for maximum security.
- 💾 Database: Raw JDBC implementation for optimized MySQL interactions.
- 📝 Logging: Integrated SLF4J for production-grade error tracking and debugging.
- 🛡️ Validation: Backend input validation and unique email constraints.
- 🍪 Session Management: Secure HTTP sessions for user authentication state.
- Language: Java (JDK 25 LTS)
- Backend: Java Servlets, JDBC
- Frontend: JSP (JavaServer Pages), CSS
- Database: MySQL
- Logging: SLF4J (Simple Logging Facade for Java)
- Build Tool: Maven
- IDE: IntelliJ IDEA
- Java Development Kit (JDK)
- Apache Tomcat Server
- MySQL Server
-
Clone the repository
git clone [https://github.com/anupamkushwaha85/java-servlet-mvc-auth-system.git](https://github.com/anupamkushwaha85/java-servlet-mvc-auth-system.git)
-
Database Setup
- Navigate to
src/main/resources/schema.sql. - Run the SQL script in your MySQL workbench to create the database and tables.
- Navigate to
-
Configuration
- Navigate to
src/main/resources/. - Rename
db.properties.exampletodb.properties. - Update the file with your local MySQL credentials:
db.url=jdbc:mysql://localhost:3306/login_db db.username=YOUR_USERNAME db.password=YOUR_PASSWORD
- Navigate to
-
Run the Application
- Open the project in IntelliJ IDEA.
- Configure the Tomcat server.
- Run the project and navigate to
http://localhost:8080/.
I am a B.Tech CSE student passionate about building scalable Java applications.
⭐ If you find this project helpful, please give it a star!