标签:request public session getattr https on() except row print
public void doFilter(ServletRequest request,ServletResponse response,FilterChain chain) throws IOException,ServletException{
System.out.println("filter1-in");
HttpServletRequest httpRequest = (HttpServletRequest)request;
HttpSession session = httpRequest.getSession();
String uid = (String)session.getAttribute("uid");
System.out.println("uid ==" + uid); //输出获得的session中属性的值
if(uid == null){
return;
}
chain.doFilter(request, response);
System.out.println("filter1-out");
}
标签:request public session getattr https on() except row print
原文地址:http://www.cnblogs.com/zhaoxingjun/p/6027548.html