controller.java
来自「为交课程设计」· Java 代码 · 共 19 行
JAVA
19 行
package com.infodeliver.hr.sys;
import org.apache.struts.action.*;
import javax.servlet.http.*;
import com.infodeliver.hr.util.HRItem;
import com.infodeliver.hr.util.DBConnection;
import java.util.ArrayList;
public class Controller extends Action {
public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws
Exception {
/**@todo: complete the business logic here, this is just a skeleton.*/
DBConnection conn = new DBConnection(2);
ArrayList role_list =new HRItem(conn).getRole("");
httpServletRequest.setAttribute("role_list",role_list);
return actionMapping.findForward("adduser");
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?