中国开发网: 论坛: 程序员情感CBD: 贴子 246843
nostalgic
靠,人品问题很严重
package CustomerService;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

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 CustomerAction extends Action {
public ActionForward execute(ActionMapping mapping,
HttpServletRequest request, HttpServletResponse response,
ActionForm form) {
CustomerForm customerForm=(CustomerForm)form;
try {
CustomerBean bean = new CustomerBean();
Customer customer =new Customer();
customer =customerForm.getCustomer();
bean.createCustomer(customer);
} catch (Exception e) {
e.printStackTrace();
}
request.setAttribute("Customer",customerForm.getCustomer());
return (mapping.findForward("customerCreated"));
}
}

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录