A full-featured e-commerce platform built with Java, JSP, Servlets, and MySQL. Supports customer shopping, product management, order processing, and admin controls.
Managing an online electronics store requires a robust system to handle:
- Product Catalog Management - Add, update, and remove products with images
- Shopping Cart Operations - Add/remove items, manage quantities
- Order Processing - Create orders, track shipments, manage transactions
- User Authentication - Secure login/registration for customers and admins
- Inventory Management - Track stock levels and demand
This project provides a complete solution for these requirements.
-
User Management
- Customer registration and login
- Admin authentication
- Session-based security
- Password encryption
-
Product Management
- Browse all products with search functionality
- Filter products by category/type
- Product images and details
- Admin product CRUD operations
- Stock management
-
Shopping Cart
- Add/remove items from cart
- Update quantities
- Real-time cart calculations
- Persistent cart storage
-
Order Management
- Create and process orders
- Order tracking and history
- Shipment management
- Transaction records
-
Admin Dashboard
- View all products
- Manage inventory
- Process orders
- Track shipments
-
Email Notifications
- Order confirmation emails
- Shipment notifications
- User registration confirmation
- Java 8+ installed
- Maven 3.6+ installed
- MySQL 8.0+ running
- Tomcat 9+ (or any servlet container)
git clone https://github.com/yourusername/ajt-ecommerce.git cd AJT_E-commerce- Create a MySQL database:
CREATE DATABASE `shopping-cart`;- Import the database schema:
mysql -u root -p shopping-cart < databases/schema.sql- Copy
.env.exampleto.env:
cp .env.example .env- Edit
.envwith your database and email credentials:
DB_CONNECTION_STRING=jdbc:mysql://localhost:3306/shopping-cart DB_USERNAME=root DB_PASSWORD=your_password MAILER_EMAIL=your-email@gmail.com MAILER_PASSWORD=your-app-specific-passwordmvn clean install- Copy the generated WAR file to Tomcat's webapps directory:
cp target/shopping-cart.war $CATALINA_HOME/webapps/- Start Tomcat:
$CATALINA_HOME/bin/startup.sh- Access the application:
http://localhost:8080/shopping-cart - Register - Create a new account
- Browse Products - Search or filter by category
- Add to Cart - Select items and quantities
- Checkout - Review cart and place order
- Track Order - View order status and shipment
- Login - Access admin dashboard
- Manage Products - Add/edit/delete products
- View Orders - Process customer orders
- Update Shipments - Track and update delivery status
- View Analytics - Monitor sales and inventory
All documentation is organized in the docs/ folder:
- QUICKSTART.md - 5-minute setup guide
- ARCHITECTURE.md - System design and architecture
- DEPLOYMENT.md - Deployment procedures
- CONTRIBUTING.md - Developer guidelines
- SECURITY.md - Security policies
- FAQ.md - Frequently asked questions
- CHANGELOG.md - Version history
- DOCS_INDEX.md - Documentation index
POST /shopping-cart/login- User loginPOST /shopping-cart/register- User registrationGET /shopping-cart/logout- User logout
GET /shopping-cart/index.jsp- View all productsGET /shopping-cart/index.jsp?search=keyword- Search productsGET /shopping-cart/index.jsp?type=category- Filter by categoryPOST /shopping-cart/AddProductSrv- Add product (Admin)POST /shopping-cart/UpdateProductSrv- Update product (Admin)POST /shopping-cart/RemoveProductSrv- Delete product (Admin)
POST /shopping-cart/AddtoCart- Add item to cartGET /shopping-cart/cartDetails.jsp- View cartPOST /shopping-cart/UpdateToCart- Update cart item
POST /shopping-cart/OrderServlet- Create orderPOST /shopping-cart/ShipmentServlet- Update shipment
GET /shopping-cart/ShowImage?id=productId- Retrieve product image
| Layer | Technology |
|---|---|
| Frontend | JSP, HTML5, CSS3, Bootstrap 3, jQuery |
| Backend | Java 8, Servlets, JSP |
| Database | MySQL 8.0 |
| Build Tool | Maven 3.6+ |
| Server | Apache Tomcat 9+ |
| Jakarta Mail API | |
| Security | Apache Commons Codec |
AJT_E-commerce/ βββ src/ β βββ com/shashi/ β βββ beans/ # Data models (ProductBean, UserBean, etc.) β βββ service/ # Service interfaces β βββ service/impl/ # Service implementations β βββ srv/ # Servlet controllers β βββ utility/ # Utility classes (DBUtil, MailUtil, etc.) β βββ constants/ # Application constants βββ WebContent/ β βββ css/ # Stylesheets β βββ js/ # JavaScript files β βββ images/ # Product images β βββ WEB-INF/ β β βββ web.xml # Servlet configuration β β βββ lib/ # JAR dependencies β βββ index.jsp # Home page β βββ header.jsp # Header component β βββ footer.html # Footer component β βββ cartDetails.jsp # Shopping cart β βββ adminHome.jsp # Admin dashboard β βββ ... # Other JSP pages βββ databases/ β βββ schema.sql # Database schema βββ pom.xml # Maven configuration βββ .env.example # Environment variables template βββ .gitignore # Git ignore rules βββ .gitattributes # Git attributes βββ LICENSE # MIT License βββ README.md # This file Edit src/application.properties:
db.driverName=com.mysql.cj.jdbc.Driver db.connectionString=jdbc:mysql://localhost:3306/shopping-cart db.username=root db.password=your_passwordUpdate mailer credentials in src/application.properties:
mailer.email=your-email@gmail.com mailer.password=your-app-specific-passwordNote: For Gmail, use an App-Specific Password.
mvn clean testmvn clean install # Deploy to Tomcat as described in Installation section- β Password encryption using Apache Commons Codec
- β Session-based authentication
- β SQL injection prevention with PreparedStatements
β οΈ TODO: Add CSRF tokensβ οΈ TODO: Implement HTTPS enforcementβ οΈ TODO: Add input validation framework
- Payment Gateway Integration - Stripe/PayPal integration
- Advanced Search - Elasticsearch integration
- User Reviews & Ratings - Product feedback system
- Wishlist Feature - Save favorite products
- Recommendation Engine - ML-based product suggestions
- Mobile App - React Native mobile client
- API Modernization - RESTful API with Spring Boot
- Analytics Dashboard - Sales and traffic analytics
- Multi-language Support - i18n implementation
- Performance Optimization - Caching and CDN integration
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
See docs/CONTRIBUTING.md for detailed guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
- Shashi Kumar - Initial development
- Contributors - See CONTRIBUTING.md
For support, email support@ellison-electronics.com or open an issue on GitHub.
java e-commerce, shopping cart application, jsp servlet project, mysql database, java web application, e-commerce platform github, shopping cart github, java project example, servlet tutorial, jsp tutorial, maven project, tomcat deployment, java backend, web development java, full-stack java, electronics store, online shopping, inventory management, order processing, user authentication java
Last Updated: December 2024
Version: 1.0.0



