在doFilter()中特别注意加入
arg2.doFilter(arg0, arg1);
另外,若想在地址栏传入参数,如:http://localhost:8080/test/index.jsp?id=1
在doFilter中取出运用request,即arg0
若想获得session,利用强制转换
HttpServletRequest request = (HttpServerletRequest)arg0;
HttpSession session = request.getSession();
本文出自 “just2012” 博客,请务必保留此出处http://just2012.blog.51cto.com/7435167/1348414