Skip to content

A complete MVC authentication system built with Java Servlets, JSP, and raw JDBC. Features include secure password validation, session management, and professional logging via SLF4J

Notifications You must be signed in to change notification settings

anupamkushwaha85/java-servlet-mvc-auth-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Servlet MVC Auth System 🔐

Java MySQL Servlet License

📋 Overview

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.


✨ Key Features

  • 🏗️ 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.

🛠️ Tech Stack

  • 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

🚀 Getting Started

Prerequisites

  • Java Development Kit (JDK)
  • Apache Tomcat Server
  • MySQL Server

Installation

  1. 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)
  2. Database Setup

    • Navigate to src/main/resources/schema.sql.
    • Run the SQL script in your MySQL workbench to create the database and tables.
  3. Configuration

    • Navigate to src/main/resources/.
    • Rename db.properties.example to db.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
  4. Run the Application

    • Open the project in IntelliJ IDEA.
    • Configure the Tomcat server.
    • Run the project and navigate to http://localhost:8080/.

📬 Contact Me

I am a B.Tech CSE student passionate about building scalable Java applications.

Email LinkedIn GitHub


Built with ❤️ by Anupam Kushwaha

If you find this project helpful, please give it a star!

About

A complete MVC authentication system built with Java Servlets, JSP, and raw JDBC. Features include secure password validation, session management, and professional logging via SLF4J

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages