⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 loginaction.java

📁 l劳动力管理系统
💻 JAVA
字号:
package com.hr.action;import org.apache.struts.action.*;import javax.servlet.http.*;import com.hr.vo.*;import com.hr.logic.HrLogic;public class LoginAction extends Action {  public ActionForward perform(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {    /**@todo: complete the business logic here, this is just a skeleton.*/    String username = httpServletRequest.getParameter("username");      String password = httpServletRequest.getParameter("password");      System.out.println("username ==" + username);      System.out.println("password ==" + password);      HrLogic logic = new HrLogic();      User user = logic.passOrNot(username,password);      Employee employee = logic.getEmployee(user.getEmployeeUID());      logic.closeDAO();      if(user!=null)      {          HttpSession session = httpServletRequest.getSession(true);          session.setAttribute("pass",employee);          System.out.println("username====" +  user.getUserName());          if(user.getUserType().intValue()==1)          {              return actionMapping.findForward("useraction");          }          if(user.getUserType().intValue()==2)          {              return actionMapping.findForward("employee");          }          if(user.getUserType().intValue()==3)          {              return actionMapping.findForward("manager");          }      }          System.out.println("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa");          return actionMapping.findForward("login");  }  }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -