Cool web site - 412 CHAPTER 10 INTRODUCTION TO FILTERING Figure

412 CHAPTER 10 INTRODUCTION TO FILTERING Figure 10-8. When a resource in a Servlet 2.4 or 2.5 container includes another resource, zero or more filters can be applied as part of the include action. Now filters can be applied in-between the first processing resource and any included resources. For example, if the first JSP page included the output from multiple JSP pages or servlets, filters could be applied to each included resource. Next, you ll look at the case when the request dispatcher forwards processing to a web resource. Consider the following filter mapping: F1 /* REQUEST FORWARD F2 /* REQUEST FORWARD F3 /* REQUEST FORWARD In this case, the filter chain will operate on both the standard request processing and the forwarded web-resource processing, as shown in Figure 10-9. This time the first web resource uses the request dispatcher s forwarding capability. The resource that the request is forwarded to is responsible for generating the actual output for the client. Here, the filter is applied before the primary web resource, and before the resource being forwarded to.
In case you need quality webspace to host and run your web applications, try our personal web hosting services.

Leave a Reply