Question
Could you please how to do Part I and Part II for the following: Part I: Web Application 1. Start by creating a web application
Could you please how to do Part I and Part II for the following:
Part I:
Web Application
1. Start by creating a web application based on a Dynamic Web Project.
2. Create a class that will represent the basic Log. The minimum attributes required include:
a. An ID
b. Title
c. The Log Content
d. A Timestamp of creation
3. This class can be based on the ones created as part of the Assignment 1. Although for this case, only one type of Log will be used, and this will not include an attachment. Therefore, it can be seen as a lightweight of the previous model. For this reason the class TextLog may be the best fit for this exercise.
Servlet Class
4. Once you have created the web application, you will then create a Servlet Class that responds to a GET request with a HTML form where a user can submit the Title and the Log Content.
5. Extend the Servlet Class for receiving a POST request with the submission.
a. Create a Log object with the data received
b. Store the object created in memory and respond to the user with a message of success or error in a HTML page.
6. Extend the response so the HTML page rendered includes the message at the top, the form right below, and a list with all the submissions ordered by the timestamp at the bottom.
7. Extend the HTML page so the user has a link per Log for deleting it.
8. Extend the Servlet so it can process the new request for deleting the object and as a response will render the HTML page updated.
9. Extend the HTML page so the user has a link per Log for editing it.
10. Extend the Servlet so it can process the new request for editing the object and as a response will render the HTML page with the form prepopulated with the Log selected.
11. Extend the Servlet so it can now process a new request for updating the object and as a response will render the HTML page updated.
Part II:
Data Persistence
1. Part II of this assignment is to create a database and a table for persisting the Logs on HSQLDB (or MySQL).
2. Create a class that will represent the Log as the data object persisted in the database.
3. Create a service class that will function as intermediator between the servlet and the database.
4. Implement in the service class the methods for creating, reading, updating and deleting (CRUD operations) Data Objects on the Database using a JDBC connection.
Thanks
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started