package org.filter;

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;

/**
 * 处理乱码
 * 
 * @author fei.teng
 * 
 */
public class EncodingFilter implements Filter {

	public void destroy() {

	}

	public void doFilter(ServletRequest request, ServletResponse response,
			FilterChain chain) throws IOException, ServletException {
		request.setCharacterEncoding("gbk");
		response.setCharacterEncoding("gbk");
		chain.doFilter(request, response);
	}

	public void init(FilterConfig arg0) throws ServletException {

	}

}
最近下载更多
嘉琪拉  LV2 2021年8月31日
wlxr1410  LV1 2021年6月7日
HUANG888  LV6 2021年2月18日
ITfans  LV19 2021年1月9日
15687890811  LV12 2020年7月1日
hxx88781143  LV8 2020年5月19日
zjjhzjb  LV14 2019年12月7日
wanglong_wang  LV13 2019年8月1日
Luis虎子  LV16 2019年6月26日
yp0416160222  LV2 2019年6月9日
最近浏览更多
fesfefe  LV13 2023年10月24日
getset  LV8 2022年12月6日
Tg171017  LV12 2022年11月30日
abc562311934  LV4 2022年10月8日
东北人  LV12 2022年9月20日
wusiyin  LV14 2022年9月15日
 LV7 2022年7月5日
heifenglei  LV7 2022年4月7日
yanliang2377912054 2021年12月22日
暂无贡献等级
梦里  LV3 2021年12月15日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友