452 CHAPTER 11 ADVANCED FILTERING TECHNIQUES the
Monday, March 24th, 2008452 CHAPTER 11 ADVANCED FILTERING TECHNIQUES the two systems. Figure 11-11 shows the result when the FindProd.jsp page receives a request without the required request parameter. This filter intercepts the request, examines where it s from, and generates the required DEPT parameter for the JSP resource so that it can function properly. It determines the department of the incoming client by examining its subnet portion of the IP address corresponding to the client (assume you have the subnet IP to department-mapping information). Therefore, this adapter translates an incoming IP address to a required DEPT parameter and allows two incompatible systems to work together. You can easily imagine many more complex examples from the real world that may require significantly more adaptation code; however, the general structure and technique for creating such adapter filters remains the same. Figure 11-11. When a request does not contain the necessary department, the resulting web page does not display correctly. The reason the message does not contain a department name is because of the missing DEPT parameter when the URL is accessed. You ll fix this by creating a filter that will adapt any incoming requests by detecting the department information and providing the missing parameter. Wrapping an Incoming Request with the LegacyAdapterFilter
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.