[阅读: 548] 2005-11-26 11:52:28
package Customer;
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 f = (customerForm) form;
try {
customerBean bean = new customerBean();
bean.createCustomer(f.getCustomer());
} catch (Exception e) {
e.printStackTrace();
}
request.setAttribute("customer", f.getCustomer());
return (mapping.findForward("customerCreated"));
}
}