dc2101e2saction.java

来自「一个完整的物流系统」· Java 代码 · 共 60 行

JAVA
60
字号
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package jp.com.cost.dc.web.action;

import java.util.List;

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 jp.com.cost.pojo.Ship;


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;

/** 
 * MyEclipse Struts
 * Creation date: 09-02-2008
 * 
 * XDoclet definition:
 * @struts.action validate="true"
 * @struts.action-forward name="DC2102" path="/dcgl/DC2102.jsp"
 */
public class DC2101E2SAction extends Action {
	/*
	 * Generated Methods
	 */

	/** 
	 * Method execute
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 */
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		// TODO Auto-generated method stub
		try {
			String id = request.getParameter("id");
			DC2101Service dc2101Service = (DC2101Service) ContextHelper
			.getContext().getBean("dc2101ServiceProxy");
			Book book = dc2101Service.searchById(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 + -
显示快捷键?