/**
 * Company Name : 中贸促信息技术有限责任公司
 * Project Name:caccpitWeb
 * File Name:XSSFilter.java
 * Package Name:ccpit.base.utils
 * Date:2016年7月26日下午1:26:03
 * Copyright (c) 2016, dingwei@ccpit.org All Rights Reserved.
 *
*/

package org.ccpit.base.utils;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;


/**
 * ClassName:XSSFilter <br/>
 * Function: TODO Xss过滤. <br/>
 * Reason:	 TODO ADD REASON. <br/>
 * Date:     2016年7月26日 下午1:26:03 <br/>
 * @author   dingwei
 * @version  
 * @since    JDK 1.6
 * @see 	 
 */
public class XSSFilter implements Filter {

	@Override
	public void init(FilterConfig filterConfig) throws ServletException {
		
	}

	@Override
	public void doFilter(ServletRequest request, ServletResponse response,
			FilterChain chain) throws IOException, ServletException {
		XssHttpServletRequestWrapper xssRequest = new XssHttpServletRequestWrapper((HttpServletRequest)request);
		chain.doFilter(xssRequest, response);
	}

	@Override
	public void destroy() {
		
	}

}

