public void doFilter(ServletRequest request, ServletResponse response,
			FilterChain chain) throws IOException, ServletException {
		Log.debug("start do Filter.....");
		HttpServletRequest req = (HttpServletRequest) request;
		HttpServletResponse resp = (HttpServletResponse) response;

		// 获取保存在session中的用户名
		String user = (String) req.getSession().getAttribute("kankantu_user");

		// 获取请求的URL
		String srcUrl = req.getRequestURL().toString();
		String[] tokens = srcUrl.split("/");
		String url = tokens[tokens.length - 1];
		if (url.equals("index.jsp") ||
				url.equals("signup.jsp") ||
				url.equals("signup.do")) {
			chain.doFilter(req, resp);

		}else if(url.equals("login.do")){
			chain.doFilter(req, resp);
		}
		else if (user == null) {
			// 用户没有登陆
			resp.sendRedirect("index.jsp");
		} else {
			// 登陆了的用户
			chain.doFilter(req, resp);
		}
	}