- The Car Sales Web Application is a Java-based platform for managing car-related transactions. It allows users to browse car listings, add new brands and models, and complete purchases. The application is built using Java Servlets and JSP with a focus on a clean and user-friendly interface.
-
User Registration and Login: Secure user authentication and profile management.
-
Car Listings: Display available car brands and models.
-
Brand and Model Management: Add new brands and car models through an admin dashboard.
-
Purchase Management: Enable users to buy cars with a seamless purchase process.
-
Admin Dashboard: Manage brands, models, and user data.
-
Project Structure
-
Backend
-
Java Classes: Located under src/main/java/com/jspservlet/carsales/
-
actions/: Contains Servlets like BrandAdd, CarAdd, BuyNow, LoginServlet, etc., to handle user actions.
-
db/: Includes database interaction classes like DB.java.
-
JSP Files: Found in src/main/webapp/
-
index.jsp: Home page.
-
login.jsp: Login page.
-
registration.jsp: User registration.
-
brand.jsp, car.jsp: Pages for managing brands and cars.
-
AdminDashboard.jsp: Admin panel.
-
Images: Stored in src/main/webapp/images/ for use in the UI.
-
Configuration
-
Eclipse Settings: .classpath and .project files for IDE configuration.
-
META-INF/MANIFEST.MF: Application manifest.
-
WEB-INF/: Contains configuration files and libraries.
-
Java Development Kit (JDK) 8 or higher
-
Apache Tomcat Server 9.0 or higher
-
IDE: Eclipse or IntelliJ IDEA
-
Setup Instructions
-
Clone the Repository: Download or clone the project to your local machine.
-
Open Eclipse or your preferred IDE.
-
Import the project as an existing Maven or Java project.
-
Set up a MySQL database.
-
Update database credentials in DB.java.
-
Deploy on Tomcat:
-
Build the project and deploy the WAR file to the Tomcat server.
Access the application at http://localhost:8080/CarSales.
- Usage
-
Navigate to the admin panel.
-
Add brands, models, and manage listings.
-
User Registration:
-
Sign up to create an account.
-
Log in to browse cars and make purchases.
-
View car listings with images and details.
-
Use the "Buy Now" option to purchase.
-
Frontend: JSP, HTML, CSS
-
Backend: Java Servlets
-
Database: MySQL
-
Server: Apache Tomcat










