-
Clone the repository:
git clone <repository_url>
-
Import the project into your favorite IDE as a Maven project.
-
Create a MySQL database and import the provided schema:
CREATE DATABASE ecommerce; USE ecommerce; CREATE TABLE users ( id INT AUTO_INCREMENT PRIMARY KEY, username VARCHAR(50) NOT NULL UNIQUE, password VARCHAR(50) NOT NULL, email VARCHAR(100) NOT NULL UNIQUE ); CREATE TABLE products ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100) NOT NULL, price DOUBLE NOT NULL, description TEXT NOT NULL, imageUrl VARCHAR(255) NOT NULL );
-
Update the database connection settings in
Database.java:private static final String URL = "jdbc:mysql://localhost:3306/ecommerce"; private static final String USER = "root"; private static final String PASSWORD = "your_database_password";
-
Build the project using Maven:
mvn clean install
-
Deploy the generated WAR file to your favorite servlet container (e.g., Apache Tomcat).
-
Access the application in your web browser:
http://localhost:8080/ecommerce
- User Registration and Login
- View Products
- Add Products to Cart
- Add Products to Wishlist
- View Cart
- View Wishlist