Skip to main content

Advanced Filtering Techniques

  • Chapter
Pro JSP 2
  • 418 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 49.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Editor information

Kevin Mukhar

Rights and permissions

Reprints 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

Publish with us

Policies and ethics