An open API service indexing awesome lists of open source software.

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.

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).