https://github.com/sahar-dev/products_managment
Products Management is a simple Java EE web application built with Servlets, JSP, and JDBC to demonstrate product catalog management. It follows the MVC (Model–View–Controller) architecture, integrates with a MySQL database, and uses Bootstrap for the front-end design.
https://github.com/sahar-dev/products_managment
jee mvc-architecture mysql-database
Last synced: 1 day ago
JSON representation
Products Management is a simple Java EE web application built with Servlets, JSP, and JDBC to demonstrate product catalog management. It follows the MVC (Model–View–Controller) architecture, integrates with a MySQL database, and uses Bootstrap for the front-end design.
- Host: GitHub
- URL: https://github.com/sahar-dev/products_managment
- Owner: Sahar-dev
- Created: 2023-04-11T13:01:21.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-09-15T12:47:04.000Z (9 months ago)
- Last Synced: 2025-11-13T09:23:17.125Z (8 months ago)
- Topics: jee, mvc-architecture, mysql-database
- Language: Java
- Homepage:
- Size: 2.67 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 📦 Products Management – Java Web Application
## 📖 Overview
**Products Management** is a simple **Java EE web application** built with **Servlets, JSP, and JDBC** to demonstrate product catalog management.
It follows the **MVC (Model–View–Controller)** architecture, integrates with a **MySQL database**, and uses **Bootstrap** for the front-end design.
The application allows you to:
- ➕ Add a new product
- 🔍 Search products by keyword
- 📋 View a list of products
- ✅ Confirm actions (insert/update)
---
## 🏗️ Project Structure
```
Products_managment
│
├── src/main/java
│ ├── metireDAO # Model & DAO layer
│ │ ├── Connect.java # Database connection (MySQL)
│ │ ├── Produit.java # Product entity (id, libelle, prix)
│ │ ├── ImetierCatalogue.java # DAO interface (CRUD contracts)
│ │ ├── Traitement.java # DAO implementation (save, search, update, delete)
│ │ └── Test.java # Simple test class
│ │
│ └── web # Controller layer
│ ├── ControleurServlet.java # Handles requests, forwards to JSP views
│ └── ProduitModele.java # Model for passing data to views
│
├── src/main/webapp
│ ├── ProduitsView.jsp # Product list & search view
│ ├── saisieProduit.jsp # Form to add a new product
│ ├── confirmation.jsp # Confirmation after actions
│ ├── header.jsp # Shared header layout
│ └── css/ # Bootstrap CSS files
│
├── build/classes # Compiled .class files
└── WEB-INF/lib # Libraries (MySQL Connector, JSTL taglibs)
```
---
## ⚙️ Technologies Used
- **Java EE (Servlets + JSP)**
- **MySQL Database** (via JDBC)
- **JSTL (taglibs-standard)** for JSP logic
- **Bootstrap CSS** for responsive design
- **Apache Tomcat** (recommended server)
---
## 🛠️ Setup & Installation
### 1. Clone the Repository
```bash
git clone https://github.com/Sahar-dev/Products_managment.git
cd Products_managment
```
### 2. Database Setup
Create a database named **`catalogue`** in MySQL:
```sql
CREATE DATABASE catalogue;
USE catalogue;
CREATE TABLE produit (
id INT PRIMARY KEY,
libelle VARCHAR(100),
prix DOUBLE
);
```
Update DB credentials in **`Connect.java`** if needed:
```java
con = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/catalogue", "root", ""
);
```
### 3. Deploy on Tomcat
- Import the project into **Eclipse/IntelliJ/NetBeans** as a *Dynamic Web Project*.
- Add **Tomcat server** configuration.
- Deploy the application.
### 4. Run the Application
Open in browser:
```
http://localhost:8080/Products_managment/controleur
```
---
## 🚀 Features
- **Add Products**: Fill form in `saisieProduit.jsp` and save to DB.
- **Search Products**: Keyword-based search (`produitParMC`) using SQL LIKE.
- **View List**: Displays product catalog dynamically.
- **Confirm Actions**: Success page for user feedback.
---
## 👨💻 Author
Developed by **Sahar Marzougui**
- [LinkedIn](https://linkedin.com/in/sahar-marzougui)
- [GitHub](https://github.com/Sahar-dev)
---
✨ This project was created as a **learning exercise** in Java Web Development (Servlets + JSP + JDBC + MVC).