To set up and deploy the project, follow these steps:
-
Update the database connection details in the
db.properties
file located in thesrc/main/resources
directory. Modify the values forurl
,username
, andpassword
according to your MySQL setup. -
Build the project using your IDE or by running the Maven command.
-
Deploy the project to the Apache Tomcat server.
-
Access the application by navigating to http://localhost:8080/crud-demo in your web browser.
The application provides the following functionality:
- Create a new user: Users can enter their name, email, and country information to create a new user record.
- Read user information: The application displays a list of all users and their respective details.
- Update user information: Users can edit their existing information, including name, email, and country.
- Delete a user: Users can delete their record from the database.
The project utilizes the following technologies:
- JSP (JavaServer Pages): Used for rendering dynamic web content.
- JDBC (Java Database Connectivity): Used for database connectivity and executing SQL queries.
- MySQL: The relational database management system.
- Servlet: Handles HTTP requests and responses.
The project structure follows the standard Maven web application structure. The key directories and files are as follows:
src/main/java
: Contains the Java source files, including servlets and database utility classes.src/main/webapp
: Contains JSP files, CSS files, and the web deployment descriptor (web.xml
).
This Java project provides a demonstration of CRUD operations using JSP, JDBC, MySQL, and Servlet. You can use this as a reference or starting point to build similar applications or integrate the provided functionality into your existing projects.