为什么不放行
public void doFilter(ServletRequest arg0, ServletResponse arg1, FilterChain arg2) throws IOException, ServletException
{
HttpServletRequest request = (HttpServletRequest) arg0;
HttpServletResponse response = (HttpServletResponse) arg1;
HttpSession session = request.getSession();
if(session.getAttribute("username")!=null)
{
arg2.doFilter(arg0, arg1);//允许放行!
}
else
{
response.sendRedirect(request.getContextPath()+"/login.jsp");
}
}