当前位置:   article > 正文

java 拦截登陆页面跳转页面跳转页面跳转页面,怎么使用filter实现未登录用户自动跳转到登录页面(答案)...

filter拦截发送的struts请求,并跳转到登录页

Java codepackage group3.tsims.tools;

import java.io.IOException;

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 AdminAuthorityFilter implements Filter {

/*

* (non-Javadoc)

* @see javax.servlet.Filter#destroy()

*/

public void destroy() {

}

/*

* (non-Javadoc)

* @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)

*/

public void doFilter(ServletRequest request, Se

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/数据挖掘灵魂/article/detail/61348
推荐阅读
相关标签
  

闽ICP备14008679号