Question: Create a new Java Web Application project. Create a ServletContextListener which gets the current time as a String and stores it as a servlet context

Create a new Java Web Application project.

Create a ServletContextListener which gets the current time as a String and stores it as a servlet context attribute (application scope bean) named something like "servletLoadTime".

Create a Filter which gets the current time for each request and sets a session attribute (session scoped bean) named something like "sessionOpenTime" as long as it does not already exist.

Create another Filter which gets the current time for each request and sets it as a request attribute named something like "requestReceivedTime".

Create a JSP which displays the servlet load time, session open time, and request received time.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!