|
Introduction to Servlet Listener using NetBeans |
|
|
Page 4 of 6
Below shows the browser that is open automatically by NetBeans.
If you carefully looked at the Tomcat console within NetBeans, you will realize that “Servlet Context is initialized…” is printed out. It means that we have successfully implemented our ServletContextListener. How do we test to destroy the ServletContextListener?
Right click your web project and choose Deploy Project. Deploying the project means that removing the application that is currently loaded and loading the new latest application to the Tomcat. By removing the application, it also means that we are destroying the ServletContext object in which should be detected by our ServletContextListener.
Now, look at the Tomcat console again. Yes, we get the desired results. Below illustrations show what I have in my machine.
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.