|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.chwf.servlet.filter.FilterSupport
Filter superclass with dummy methods to simplify filter creation. It based on the same principle as the TagSupport classes.
Constructor Summary | |
FilterSupport()
|
Method Summary | |
void |
destroy()
Called by the web container to indicate to a filter that it is being taken out of service. |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
The doFilter method of the Filter is called by the container each time a request/response pair is passed through the chain due to a client request for a resource at the end of the chain. |
void |
doHttpFilter(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain)
A doFilter() method for HTTP filters (the norm). |
protected javax.servlet.FilterConfig |
getConfig()
Get FilterConfig. |
void |
init(javax.servlet.FilterConfig config)
Called by the web container to indicate to a filter that it is being placed into service. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FilterSupport()
Method Detail |
public void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletException
The dummy method stores the config in an instance variable.
init
in interface javax.servlet.Filter
config
- The filter config.javax.servlet.ServletException
- Will prevent the filter from being initialized.public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException
The dummy method delegates to doHttpFilter()
doFilter
in interface javax.servlet.Filter
request
- The request.response
- The response.chain
- The filter chain.javax.servlet.ServletException
- For servlet errors.java.io.IOException
- For I/O errors.public void doHttpFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException
doFilter()
method for HTTP filters (the norm).
The dummy method invokes the next filter in the chain. This method should be overridden by subclasses.
request
- The request.response
- The response.chain
- The filter chain.javax.servlet.ServletException
- For servlet errors.java.io.IOException
- For I/O errors.public void destroy()
The dummy method does nothing.
destroy
in interface javax.servlet.Filter
protected javax.servlet.FilterConfig getConfig()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |