Advanced Filtering (Web hosting india) Techniques CHAPTER 11

Advanced Filtering Techniques CHAPTER 11 In the previous chapter, we discussed Servlet filtering. Filtering offers the ability to intercept and process requests and responses before and after processing by the underlying resource. Filters can add great value to many Java EE web applications by transforming the behavior of existing servlets, JSP pages, or even static pages. Chaining multiple filters together combines their transformations, offering the application developer or deployer great flexibility when configuring the final behavior of a web application. Now that you ve built and configured some simple filters in the preceding chapter to experiment with the basic concepts, you ll turn your attention to the more advanced techniques used in applied filter programming. This chapter is a cookbook for the application of filters. Our goal is to deliver sample code that covers a broad spectrum of the most frequently applied areas for filters. We ve designed each sample to illustrate several subtleties or important points to consider when you program each type of filter. Filters for Five Problem Domains You ll build, test, and deploy five filters in this chapter. These five filters, as shown in Table 11-1, cover five problem domains that you might encounter while developing web applications. These are not the only domains where filters might be useful. However, looking at these five filters will give you the tools to develop filters for many other possible uses. Table 11-1. The Five Filters Developed in This Chapter Application Domain Filter Sample Auditing A visual auditing filter that includes audit information inline with every resource that it services Authorization A filter that disallows access to the server during certain hours of the day Adapter (legacy) An adapter filter that allows newly formatted queries to work with a legacy set of resources Authentication An ad hoc authentication filter that can add simple login protection to any (group of) resources Pipeline processing A data-processing filter that takes advantage of the request flow along the processing pipeline 433
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

Leave a Reply