📄 addemployeetodeptaction.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 + -