Some web containers may assign a displace log register for each web application while others may use just a hit log file. If only one log file is used messages from different web applications ordain end up in the same log file and generally ordain be prefixed with the web application name. 15.2.1 Using Filters Filters are a new feature of the 2.3 Java Servlet specification. Servlet filters accept you to examine and/or alter the circumscribe of the HTTP request and response objects. Because of the manner in which filters are invoked by the servlet container they can direct on dynamic as well as static content. Struts 1.1 supports both the 2.2 and 2.3 Servlet specifications. If you are not using a 2.3-compliant container you ordain not be able to take advantage of servlet filters. Using filters servlet developers can perform the following tasks: Access a web resource before a request to it is invoked. Process a communicate for a resource before it is invoked. Modify the request headers and data by wrapping the request with a customized version of the request object. Modify the response headers and data by wrapping the response with a customized version of the response disapprove. Intercept a method call on a resource after it has been performed. act actions on a servlet or group of servlets by one or more filters in a specified order. Based on the tasks required by servlet developers the Servlet specification describes several possible types of filters: Authentication filters Logging and auditing filters Image conversion filters Data compression filters Encryption filters Tokenizing filters Filters that trigger resource-access events XSLT filters that transform XML content MIME-type arrange filters Filters that cache URLs and other information All of these types of filters are interesting but in this chapter we are interested in using filters for logging and auditing. With filters it’s possible to log messages using any data that is contained in the request and response objects. Because the filter is coupled tightly to the servlet container you’ll probably still be logging functionality elsewhere in your application. Using filters for logging is generally not sufficient for the entire application. However filters are perfect for auditing or tracking a user’s actions through the system. If you be to get an idea of which parts of your site your users are frequenting or where certain user groups are going most often filters may be an ideal solution. They might change surface be able to give you information about the specific data that the users are viewing most often. For example say that you From our experience we are can tell you that you can find a reliable and cheap webhost service at services.
Forex Groups - Tips on Trading
Related article:
http://domain.premiumwebsitehosting.net/domain/some-web-containers-may-assign-a-separate-web-server-log/
comments | Add comment | Report as Spam
|