Package com.iqbon.jcms.util

Examples of com.iqbon.jcms.util.JCMSProperties


    ModelAndView view = new ModelAndView();
    User user = userService.userValidation(userName, password);
    if (user == null) {//用户不存在
        view.setViewName(KeyConstant.ERROR_PAGE);
      } else {
      JCMSProperties propertiy = JCMSProperties.getInstance();
        HttpSession session = request.getSession();
        if (authCode.equals(session.getAttribute(KeyConstant.SESSION_KEY_AUTH_CODE))) {
        if (BooleanUtils.isTrue(remember)) {//保存记住用户名的cookie
            Cookie cookie = new Cookie(KeyConstant.COOKIE_KEY_USERNAME, userName);
            cookie.setMaxAge(3600 * 24 * 7);
          cookie.setPath(propertiy.getHost());
            response.addCookie(cookie);
          }
          session.removeAttribute(KeyConstant.SESSION_KEY_AUTH_CODE);
          session.setAttribute(KeyConstant.SESSION_KEY_USER, user);
          view.setViewName("redirect:/admin/common/index.do");
View Full Code Here

TOP

Related Classes of com.iqbon.jcms.util.JCMSProperties

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.