Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Servlet Clinic System

Java Servlet Clinic System is a Java web application built with JSP, Servlet, Maven, and MySQL.
The project simulates a basic clinic-style patient registration workflow, allowing users to submit patient and medical record data through a web form and store the submitted records in a relational database.

「Java Servlet Clinic System」是一個以 Java Servlet / JSP 製作的診所資料登錄練習專案。使用者可以透過網頁表單輸入病患與診療相關資料,系統會將資料送至 Servlet 後端處理,並透過 MySQL 資料庫儲存,模擬基礎的醫療資料登錄流程。

Project Purpose

This project was developed as a Java web application practice project for learning backend request handling, JSP page rendering, database connection, and web application deployment.

It focuses on connecting frontend form input, Servlet-based backend logic, JDBC database operations, Maven project structure, and Apache Tomcat deployment.

Features

  • Patient medical record registration form

  • Submit patient data from JSP pages to Java Servlet

  • Process HTTP GET and POST requests

  • Store registration data in a MySQL database

  • Display submitted patient information on a success page

  • Practice JDBC database connection and SQL insertion

  • Practice cookie and session handling

  • Maven WAR packaging for Apache Tomcat deployment

Tech Stack

Web Application

  • Java

  • JSP

  • Java Servlet API

  • HTML / CSS

  • Maven

Backend and Database

  • Java Servlet

  • JDBC

  • MySQL / MariaDB

  • MySQL Connector/J

Server and Tools

  • Apache Tomcat 9

  • IntelliJ IDEA

  • Git / GitHub

  • Maven Wrapper

System Architecture

JSP / HTML Pages
        ↓
HTTP Form Request
        ↓
Java Servlet Controller
        ↓
JDBC PreparedStatement
        ↓
MySQL / MariaDB Database
        ↓
JSP Result Page

Docs

Main Modules

Patient Registration

The main feature of this project is the patient registration workflow.
Users enter patient and medical record information through a JSP form. The submitted data is then sent to a Servlet, processed on the backend, inserted into the database, and displayed on a success page.

Related files include:

  • src/main/webapp/forms/patientForm.jsp

  • RegisterPatientServlet

  • src/main/webapp/success.jsp

Form Handling Practice

This project also includes basic GET and POST form handling examples to practice how web pages send data to Java Servlets.

Related examples include:

  • GetFormServlet

  • PostFormServlet

Cookie and Session Practice

Cookie and session examples are included to practice basic state management in Java web applications.

Related examples include:

  • CookiesServlet

  • SessionServlet

Database

The project connects to a local MySQL / MariaDB database.

Sample course data is included in:

course.sql

The patient registration feature expects a patient or medical record table that matches the insert logic in RegisterPatientServlet.

Run Locally

  1. Install Java 8 or later.

  2. Install Apache Tomcat 9.

  3. Install MySQL or MariaDB.

  4. Create a local database.

  5. Import the sample SQL file if needed:

mysql -u <username> -p <database_name> < course.sql
  1. Update the JDBC username, password, and database URL in the Servlet files.

  2. Build the project:

./mvnw clean package
  1. Deploy the generated WAR file from the target/ folder to Apache Tomcat.

Course Connection

This project was created for 程式設計(二)(Java Programming).

The project helped me connect Java programming concepts with practical web application development, including Servlet classes, request and response handling, JSP pages, JDBC database access, and Maven-based project organization.

What I Learned

Through this project, I learned how a Java web application receives user input from JSP pages, processes requests through Servlets, and stores data in a relational database. I also practiced JDBC, Maven project management, Tomcat deployment, and the importance of separating frontend pages, backend request handling, and database operations.

This project also helped me understand how classroom Java programming concepts can be extended into a database-backed web application.

Notes

This project is a course / practice prototype. It is intended to demonstrate Java Servlet, JSP, JDBC, and database integration concepts, not a commercial production medical system.

About

A Java Servlet and JSP web application for clinic-style patient registration, JDBC database integration, and Tomcat deployment practice.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages