赞
踩
框架使用SSH
1、首先写好filter,如下
- package com.alpha.web.filter;
-
- import java.io.IOException;
- import java.util.ArrayList;
- import java.util.List;
-
- import javax.servlet.Filter;
- import javax.servlet.FilterChain;
- import javax.servlet.FilterConfig;
- import javax.servlet.ServletException;
- import javax.servlet.ServletRequest;
- import javax.servlet.ServletResponse;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- import javax.servlet.http.HttpSession;
-
- public class CheckLoginFilter implements Filter {
- private String redirectURL = "";
- private List<String> notCheckURLList = null;
-
- @Override
- public void destroy() {
- this.notCheckURLList.clear();
- }
-
- @Override
- public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse,
- FilterChain filterChain) throws IOException, ServletException {
- HttpServletRequest request = (Htt
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。