advertisement
Login | Register   
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   TIP BANK
Browse DevX
Download the code for this article
Partners & Affiliates
advertisement
advertisement
advertisement
advertisement
 

Unheralded Java Filters Simplify Web-app Testing

Java filters, the powerful—yet under-appreciated—components of the Java Servlet specification, can perform a range of useful tasks. Make them a part of your Java Web application toolkit. 


advertisement
ava filters, first introduced in the Java Servlet specification 2.3, are a powerful addition to any Java Web application toolkit, yet they probably are the most under-used and under-appreciated of the servlet components. These classes intercept requests coming into and responses coming out of the Java servlet container, allowing developers to inspect and manipulate these messages, as well as take other actions based on the messages' content. Despite this useful functionality, many Java developers are unfamiliar with filters.

What makes filters so powerful is the range of tasks they can perform. For example, you can use them to:

  • block non-authenticated users or encrypt sensitive content as it travels back to the client
  • compress pages returned from your Web app in order to save bandwidth
  • log application access statistics
  • transform all your GIF images to PNG images on the fly

It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com.
Already a member?



advertisement