权限控制(粗粒度)-通过filter与弹出层
过滤器编写步骤:
1.编写一个类
实现filter接口
重写方法
2.编写配置文件
<filter>
<filter-mapping>
编写一个privilegeFilter
判断用户是否登录(session)
若为空
请求转发到msg.jsp 携带信息
--------------------------------------------------------------------------------------------------------------
PrivilegeFilter
package com.feizhu.web.filter;
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 com.feizhu.domain.User;
public class PrivilegeFilter implement