dc2101e1saction.java
来自「一个完整的物流系统」· Java 代码 · 共 37 行
JAVA
37 行
package jp.com.cost.dc.web.action;
import java.util.List;
import javax.naming.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jp.com.cost.common.ContextHelper;
import jp.com.cost.dc.service.DC2101Service;
import jp.com.cost.dc.web.form.DC2101Form;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class DC2101E1SAction extends Action{
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {
try {
DC2101Service dc2101Service = (DC2101Service)ContextHelper.getContext().getBean("dc2101ServiceProxy");
DC2101Form dc2101form = (DC2101Form)form;
System.out.println(dc2101form.getId());
String id = String.valueOf(dc2101form.getId());
List list = dc2101Service.searchByCon(id);
request.getSession().setAttribute("DC2101ViewEntity1List", list);
} catch (RuntimeException e) {
// TODO Auto-generated catch block
return mapping.findForward("error");
}
return mapping.findForward("success");
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?