WebLogic Server 7.0 Code Examples, BEA Systems, Inc.

examples.servlets.wrapper
Class SubstFilter

java.lang.Object
  |
  +--examples.servlets.wrapper.SubstFilter
All Implemented Interfaces:
javax.servlet.Filter

public class SubstFilter
extends java.lang.Object
implements javax.servlet.Filter

SubstFilter is a servlet filter that sets init parameters from the web.xml file, and passes them on to the wrapper to modify the servlet response.

Author:
Copyright (c) 2002 by BEA Systems, Inc. All Rights Reserved.

Constructor Summary
SubstFilter()
           
 
Method Summary
 void destroy()
          Destroys the servlet filter.
 void doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain)
          The main servlet filter method.
 void init(javax.servlet.FilterConfig filterConfig)
          Initializes the parameters from the web.xml.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubstFilter

public SubstFilter()
Method Detail

destroy

public void destroy()
Destroys the servlet filter. Must be implemented.
Specified by:
destroy in interface javax.servlet.Filter

doFilter

public void doFilter(javax.servlet.ServletRequest req,
                     javax.servlet.ServletResponse res,
                     javax.servlet.FilterChain chain)
              throws java.io.IOException,
                     javax.servlet.ServletException
The main servlet filter method. Sets up the wrapper, and calls the next filter in the chain (if any). doFilter must be implemented in all servlet filters.
Specified by:
doFilter in interface javax.servlet.Filter

init

public void init(javax.servlet.FilterConfig filterConfig)
          throws javax.servlet.ServletException
Initializes the parameters from the web.xml. Init must be implemented
Specified by:
init in interface javax.servlet.Filter

Documentation is available at
http://e-docs.bea.com/wls/docs70

Copyright © 2002 BEA Systems, Inc. All Rights Reserved.