This is a Java-based ECommerce web application that provides a platform for users to browse, manage, and purchase products online. It supports user authentication, product management, shopping cart functionality, and order processing.
- User registration, login, and logout
- Product listing with pagination
- Product categories
- Shopping cart management (add, update, remove items)
- Order history and management
- Product image upload and display
- Role-based access control for product management
- Java Servlet API
- JSP for views
- MySQL for database
- JDBC for database connectivity
- Apache Tomcat (assumed) as the servlet container
- Java JDK 8 or higher
- Apache Tomcat server
- MySQL database
- Maven (optional)
- Create a MySQL database named
ecommerce_db. - Create the required tables (
users,products,categories,orders,order_items,cart, etc.) according to your schema. - Update database connection credentials in
src/java/config/DBConnection.javaas needed.
- Build the project using your IDE or Maven.
- Deploy the WAR file (or project directory) to your Apache Tomcat server.
- Start the Tomcat server.
- Access the app at:
[http://localhost:8080/](http://localhost:8080/)<context-path>
src/java/
config/ # Configuration classes (DB connection, constants)
controllers/ # Servlet controllers (auth, product, cart, order)
dao/ # Data Access Objects for DB operations
exceptions/ # Custom exceptions
models/ # JavaBeans (User, Product, etc.)
services/ # Business logic
utils/ # Utility classes
web/ # JSP files & static resources
nbproject/ # NetBeans project files
- Register or log in as a user
- Browse products by category or search
- Add products to your cart and checkout
- View your order history
- Product owners can manage products (add, update, delete)
Contributions are welcome!
Fork the repository and create a pull request with your improvements.
This project is licensed under the MIT License – see the LICENSE file for details.