Summary
In this chapter, we’ve worked through five complete filter examples covering these application domains:
-
Auditing
-
Authorization
-
Adapting legacy resources
-
Authentication
-
Request-processing pipeline
Working through the code to these filters, we’ve discussed the following:
-
Generating our own response and blocking downstream processing
-
Wrapping a response to transform or replace its content
-
Wrapping a response to change its headers
-
Wrapping a request to modify headers
-
Accessing initialization parameters
-
Dynamically altering filter behavior based on the incoming request
-
Controlling the interaction of filters and the request dispatcher
-
Applying filters in a processing pipeline configuration
You now have five examples that you can use as the basis for your own filter implementation. You also have one versatile class, ReplaceContentOutputStream, that you can use whenever you need to wrap a response to modify its content.
You should now be fluent in filtering technology, and you should be able to apply filters to many challenges that the real world may throw at you.
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Editor information
Rights and permissions
Copyright information
© 2005 Simon Brown, Sam Dalton, Daniel Jepp, Dave Johnson, Sing Li, and Matt Raible
About this chapter
Cite this chapter
(2005). Advanced Filtering Techniques. In: Mukhar, K. (eds) Pro JSP 2. A-Press. https://doi.org/10.1007/978-1-4302-0111-3_11
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0111-3_11
Publisher Name: A-Press
Print ISBN: 978-1-59059-513-8
Online ISBN: 978-1-4302-0111-3
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books