Filters

Filter is a Java class that sits between a Web server and a servlet. A filter intercepts HTTP requests sent to a servlet and can transform the requests sent to and the responses received from the servlet.

Filters are a new feature introduced in the Java Servlet API 2.3 specification. Since WebLogic Server 7.0 supports this specification, it provides support for developing and deploying filters in the WebLogic Server environment.

Concepts

You can utilize filters effectively in these areas:

  • Encryption

  • Compression

  • Content transformation

  • Debugging and tracing

  • Logging and audit trails

The Filter Java class implements the Filter interface. The Filter interface contains the following methods:

  • doFilter()— This method must be implemented by the

Get Sams Teach Yourself BEA WebLogic Server 7.0™ in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.