UserApp โ Authentication & Access Control using Java Servlets and JSP
A backend-focused mini project built using Java Servlets, JSP, JDBC, and MySQL to strengthen core Java web development fundamentals and understand what happens under the hood of modern frameworks like Spring Boot.
๐ Project Overview
UserApp is a simple authentication and access control system that allows users to register, log in, and view their profile details.
The project demonstrates an end-to-end Java web application flow:
Client โ Servlet โ Service/DAO โ Database โ JSP
This project was built as a fundamentals refresher while primarily working with Spring & Spring Boot, reinforcing how these frameworks are built on top of Servlets and a Servlet container (Tomcat).
โจ Features
-
๐ User Registration with form handling via Servlets
-
๐๏ธ Database persistence using JDBC and MySQL
-
โ Login authentication by validating credentials from the database
-
๐งพ JSP used for rendering views and displaying user profile data
-
๐ Clear separation of layers:
- Controller (Servlet)
- Service
- DAO
- Model (Entity)
๐ธ Screenshots
Home Page
Register Page
Login Page
User Profile
๐ ๏ธ Tech Stack
- Java (JDK 17)
- Java Servlets
- JSP
- JDBC
- MySQL
- Apache Tomcat 10
- HTML / CSS
๐ Project Structure
UserApp
โ
โโโ src/main/java
โ โโโ com.dao
โ โ โโโ UserDao.java
โ โโโ com.entity
โ โ โโโ User.java
โ โโโ com.service
โ โ โโโ UserService.java
โ โโโ com.servlet
โ โ โโโ RegisterServlet.java
โ โ โโโ LoginServlet.java
โ โ โโโ LoginFormServlet.java
โ โโโ com.util
โ โโโ JDBC_Util.java
โ
โโโ src/main/webapp
โ โโโ home.jsp
โ โโโ login.jsp
โ โโโ register.jsp
โ โโโ profile.jsp
โ โโโ WEB-INF
โ โโโ web.xml
โ
โโโ lib
โโโ mysql-connector-j.jar
โ๏ธ Application Flow
- User registers via register.jsp
- Data is handled by RegisterServlet
- Data is persisted using UserDao (JDBC)
- User logs in via login.jsp
- Credentials are validated against the database
- On success, user details are forwarded to profile.jsp
- On failure, an error message is displayed
๐ง Why This Project?
Although frameworks like Spring Boot improve productivity, they are built on the same core concepts:
- Servlets
- Request lifecycle
- Filters
- Sessions
- MVC pattern
Working directly with Servlets and JSP helps in:
- โ๏ธ Better debugging of production issues
- โ๏ธ Clear understanding of request/response lifecycle
- โ๏ธ Writing cleaner, more efficient Spring Boot applications
Strong fundamentals make better engineers.
โถ๏ธ How to Run
- Clone the repository
- Import the project into Eclipse / IntelliJ
- Configure Apache Tomcat 10
- Create a MySQL database and
userstable - Update DB credentials in
JDBC_Util.java - Deploy and run the application
๐จโ๐ป Author
Nitish Chintakindi :
Java Backend Developer | Spring & Spring Boot
Focused on building scalable and maintainable systems
โญ If you find this useful, feel free to star the repository!