一、用户注册
二、登陆校验拦截器
1.拦截器
public class PrivilegeInterceptor extends MethodFilterInterceptor { @Override//不校验登陆和注册方法protected String doIntercept(ActionInvocation invocation) throws Exception {//1 获得SessionMap session = ActionContext.getContext().getSession();//2 获得登陆标识User user = (User) session.get("user");//3 判断标识是否存在if(user != null){//存在=> 放行return invocation.invoke(); }else{//不存在=> 重定向到登陆页面return "toLogin"; } }} 2.struts.xml
login,regist /login.jsp
三、员工拜访客户功能
1.表|实体设计
2.客户拜访记录添加
时间控件在jsp的运用:
<script>script><script>script><script>script><script>$(document).ready(function(){ // yy 已经代表了4位的年份 // mm 代表月份 // dd 代表日期 $('#visit_time').datepick({dateFormat: 'yy-mm-dd'}); $('#visit_nexttime').datepick({dateFormat: 'yy-mm-dd'}); });script>3.客户拜访记录列表
作业:再增加一个查询条件,就是根据业务员来查询
4.客户拜访记录修改
四、MD5加密
public class MD5Utils {public static String md5(String plainText) {byte[] secretBytes = null;try { secretBytes = MessageDigest.getInstance("md5").digest( plainText.getBytes()); } catch (NoSuchAlgorithmException e) {throw new RuntimeException("没有md5这个算法!"); } String md5code = new BigInteger(1, secretBytes).toString(16);// 16进制数字// 如果生成数字未满32位,需要前面补0for (int i = 0; i 
