如果您需要允许访问,只需致电
// it will process request normally, means it will leave the control from Filterchain.doFilter(request, response);
如果您想限制用户,请致电
//take some actionresponse.sendRedirect("URL to some page");//it will simply make user redirected一些建议
使用某种XML属性文件使其可配置,您的代码对我而言似乎很难,明天可能会添加另一个页面,因此您需要重新编译您的Filter。
如果允许,那么只需使用Spring Security,它就会具有不错的功能。你也不会发明轮子



