?? f02f926617e8001b1f64ced6b2628f88
字號:
package com;
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;
public class FilterTest implements Filter {
protected FilterConfig config;
String targerEncoding = "gb2312";
public void init(FilterConfig config) throws ServletException {
// TODO Auto-generated method stub
this.config = config;
this.targerEncoding = config.getInitParameter("Encoding");
}
public void doFilter(ServletRequest arg0, ServletResponse arg1,
FilterChain arg2) throws IOException, ServletException {
// TODO Auto-generated method stub
System.out.println("現(xiàn)在使用的編碼方式為:"+this.targerEncoding);
}
public void destroy() {
// TODO Auto-generated method stub
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -