dc2101e3saction.java
来自「一个完整的物流系统」· Java 代码 · 共 32 行
JAVA
32 行
package jp.com.cost.dc.web.action;
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.pojo.Book;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.springframework.beans.BeansException;
public class DC2101E3SAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
try {
String id = request.getParameter("id");
DC2101Service dc2101Service = (DC2101Service) ContextHelper
.getContext().getBean("dc2101ServiceProxy");
Book book = dc2101Service.searchByUpdate(id);
request.setAttribute("book",book);
} catch (BeansException e) {
// TODO Auto-generated catch block
return mapping.findForward("error");
}
return mapping.findForward("success");
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?