GTU WTAD Practical 22 : Create a servlet filter that logs all access to and from servlets in an application and prints

GTU WTAD Practical 22 :    Create a servlet filter that logs all access to and from servlets in an application and prints
the following to System.out:
1.  the time the request was received
2.  the time the response was sent
3.  how much time it took to process the request
4.  the URL of the resource requested
5.  the IP address of the visitor

GTU WTAD Practical 22 :    Create a servlet filter that logs all access to and from servlets in an application and prints

 

File Name : index.jsp

File Location : Tomcat_Apache\webapps\gtu22\

 

File Name : FilterDemo.java

File Location : Tomcat_Apache\webapps\gtu22\WEB-INF\classes

 

File Name : FilterDemo_Servlet.java

File Location : Tomcat_Apache\webapps\gtu22\WEB-INF\classes

 

File Name : web.xml

File Location : Tomcat_Apache\webapps\gtu22\WEB-INF

 

Output

GTU WTAD Practical 22 :    Create a servlet filter that logs all access to and from servlets in an application and prints

Adarsh Patel

My Self Adarsh Suryakant Patel. Currently I am working as Assistant Professor at Parul Instiute of Engineering and Technology, MCA Department, Limda, Vadodara. Major Responsibility : * Lectures * Organizing Training and Expert Sessions for * Placement and Recruitment * Faculty Representative