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 資料庫儲存,模擬基礎的醫療資料登錄流程。
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.
-
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
-
Java
-
JSP
-
Java Servlet API
-
HTML / CSS
-
Maven
-
Java Servlet
-
JDBC
-
MySQL / MariaDB
-
MySQL Connector/J
-
Apache Tomcat 9
-
IntelliJ IDEA
-
Git / GitHub
-
Maven Wrapper
JSP / HTML Pages
↓
HTTP Form Request
↓
Java Servlet Controller
↓
JDBC PreparedStatement
↓
MySQL / MariaDB Database
↓
JSP Result Page
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
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 examples are included to practice basic state management in Java web applications.
Related examples include:
-
CookiesServlet -
SessionServlet
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.
-
Install Java 8 or later.
-
Install Apache Tomcat 9.
-
Install MySQL or MariaDB.
-
Create a local database.
-
Import the sample SQL file if needed:
mysql -u <username> -p <database_name> < course.sql-
Update the JDBC username, password, and database URL in the Servlet files.
-
Build the project:
./mvnw clean package- Deploy the generated WAR file from the
target/folder to Apache Tomcat.
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.
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.
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.