登录和权限验证判断在后台管理系统中是最常用的功能,这部分代码是比较固定和独立的,为了减少对业务代码入侵性,一般我会考虑使用Filter来实现,下面我就来详细说一下我的实现思路和代码:
前台页面:
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
会员登录--蓝狐通用后台管理系统#line-chart {
height: 300px;
width: 800px;
margin: 0px auto;
margin-top: 1em;
}
.brand {
font-family: georgia, serif;
}
.brand .first {
color: #ccc;
font-style: italic;
}
.brand .second {
color: #fff;
font-weight: bold;
}
会员登录
- ${errorMessage}
用户名
密码
登录页面很简单就是一个登录表单。
后台Controller:
package com.lanhusoft.controllers;
import com.lanhusoft.dao.mybatis.UserInfoImpl;
import com.lanhusoft.model.Sys_UserInfo;
import com.lanh