笔记,只供自己参考,水平相当菜
配置过滤器,拦截用户请求,如果用户没有登录,就转到登录页面,登录成功后再返回到之前的页面
1 在web.xml中加入过滤器的配置
<?xml version="1.0" encoding="GBK"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation