The Student Registration Web Application is a simple Java web application built using Java Servlets, JSP, JDBC, MySQL, and Apache Tomcat. It allows users to:
- Register students using a web form
- Store student data in a MySQL database
- View all registered students in a tabular format
This project demonstrates MVC architecture, database connectivity, and Java EE web development fundamentals.
- Java (JDK 17+ / JDK 25)
- Jakarta Servlet API
- JSP (JavaServer Pages)
- JDBC
- MySQL
- Apache Tomcat 10.1.x
- Maven
- Bootstrap 5 (Frontend styling)
StudentRegistrationApp
│
├── src
│ └── main
│ ├── java
│ │ ├── controller
│ │ │ ├── RegisterStudentServlet.java
│ │ │ └── ShowStudentsServlet.java
│ │ │
│ │ ├── dao
│ │ │ └── StudentDAO.java
│ │ │
│ │ ├── model
│ │ │ └── Student.java
│ │ │
│ │ └── util
│ │ └── DBConnection.java
│ │
│ └── webapp
│ ├── index.jsp
│ ├── students.jsp
│ └── WEB-INF
│ └── web.xml
│
├── pom.xml
└── README.md
- User inputs Name, Email, and Year
- Data is validated and stored in MySQL
- Displays all registered students in a table
- Clean and responsive UI using Bootstrap
CREATE DATABASE studentdb;
USE studentdb;CREATE TABLE students (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100),
email VARCHAR(100),
year INT
);Edit DBConnection.java:
private static final String URL = "jdbc:mysql://localhost:3306/studentdb";
private static final String USER = "root";
private static final String PASSWORD = "your_password";- Java JDK
- Apache Maven
- MySQL Server
- Apache Tomcat 10.1.x
- IntelliJ IDEA (Recommended)
- File → Open → Select project folder
- Wait for Maven dependencies to download
-
Run → Edit Configurations
-
Add Tomcat Server (Local)
-
Deployment:
- Select StudentRegistrationApp: war exploded
-
Port:
8080
-
Start MySQL from:
- XAMPP / MySQL Installer / Services
-
Confirm MySQL is running
- Click Run ▶
- Open browser and visit:
http://localhost:8080/StudentRegistrationApp/
| Feature | URL |
|---|---|
| Student Registration | /index.jsp |
| View Students | /show_all |
- Open Registration Page
- Enter student details
- Click Register
- Click View All Students
- Data appears in the table
- Model:
Student.java - View:
index.jsp,students.jsp - Controller: Servlets
- DAO: Handles database operations
- Edit & delete students
- Search and filter
- Pagination
- Login system
- REST API version
Name: Petros Sisay
Course: Advanced Java Programming
Project Type: Academic / Learning Project
