posts - 18,  comments - 1,  trackbacks - 0

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

public abstract class HttpFilter implements Filter
{
    private FilterConfig config;
   
    //////////////////////////////////
    public void init(FilterConfig config) throws ServletException
    {
        this.config = config;
        init();
    }
   
    public void init() throws ServletException
    {
    }
    ///////////////////////////////
    public FilterConfig getFilterConfig()
    {
        return config;
    }
   
    public String getInitParameter(String name)
    {
        return config.getInitParameter(name);
    }
   
    public ServletContext getServletContext()
    {
        return config.getServletContext();
    }
   
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
                                                throws IOException, ServletException
    {
        doFilter((HttpServletRequest)request, (HttpServletResponse)response, chain);
    }
   
    public abstract void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
                                                throws IOException, ServletException;
   
    public void destroy()
    {
    }
}

posted on 2007-04-06 16:31 sunny 阅读(301) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航:
 
<2007年4月>
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

常用链接

留言簿(1)

随笔分类

随笔档案

相册

收藏夹

朋友

搜索

  •  

最新评论

评论排行榜