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

📄 addemployeetodeptaction.java

📁 系统项目的一部分 开发工具:JBuilder X. 数据库:mysql. 数据库名:user. 两张表:(1)employee,(2)department
💻 JAVA
字号:
package com.jspdev.ch17;import org.apache.struts.action.*;import javax.servlet.http.*;public final class AddEmployeeToDeptAction extends Action {  public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {    /**@todo: complete the business logic here, this is just a skeleton.*/    DynaActionForm f = (DynaActionForm) actionForm;    String employId=(String)f.get("employId");    String deptId=(String)f.get("deptId");    try    {      EmployeeBean bean=new EmployeeBean();      bean.resetEmploy(employId,deptId);    }    catch(Exception e)    {       e.printStackTrace();    }    //return    httpServletRequest.setAttribute("deptId",deptId);    return(actionMapping.findForward("success"));  }}

⌨️ 快捷键说明

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