This is E-Commerce Website
Setup Instructions
-
Database Setup
-
Open your MySQL Client (e.g., Workbench, PHPMyAdmin).
-
Open the database.sql file located in the project folder.
-
Execute the entire script to create the ecommerce_db database and insert the default products.
-
Important: Open src/utils/DBConnection.java and update the PASSWORD field with your MySQL password.
-
Import into Eclipse (Dynamic Web Project)
-
Open Eclipse IDE.
-
Go to File > New > Dynamic Web Project.
-
Project Name: EcommerceWebsite.
-
Click Finish.
-
Copy the contents of the Ecommerce-Website-Java folder (specifically src and WebContent) and paste them into your new Eclipse project directory, overwriting existing files.
-
Right-click the project in Eclipse > Refresh.
-
Add MySQL Connector JAR
-
Download the MySQL Connector/J (JAR file).
-
Copy the JAR file into WebContent/WEB-INF/lib/.
-
(If lib folder doesn't exist, create it inside WEB-INF).
-
Right-click the JAR in Eclipse > Build Path > Add to Build Path.
-
Run the Project
-
Right-click on WebContent/login.jsp (or the project root).
-
Select Run As > Run on Server.
-
Choose your Apache Tomcat server.
-
The application should open in your browser.
Features Overview
- Register: Create a new account (stored in DB).
- Login: Enter credentials -> Check Console for 6-digit OTP -> Verify OTP.
- Products: View products, add to cart.
- Cart: View items, remove items, see total.
- Checkout: Fake payment form -> Order Confirmed with Order ID.