⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 regpaymentcardaction.java

📁 Struts+Spring+Hibernate实现的在线拍卖系统,去掉了这些组件自身的jar包
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package org.bestteam.web.struts.action;

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;
import org.bestteam.domain.PaymentCard;
import org.bestteam.domain.UserInfo;
import org.bestteam.service.RegisterService;
import org.bestteam.web.struts.form.RegPaymentCardForm;

/** 
 * MyEclipse Struts
 * Creation date: 01-26-2007
 * 
 * XDoclet definition:
 * @struts.action path="/regPaymentCard" name="regPaymentCardForm" input="/login/regPaymentCard.jsp" validate="true"
 */
public class RegPaymentCardAction extends Action {
	private RegisterService registerService;
	

	public void setRegisterService(RegisterService registerService) {
		this.registerService = registerService;
	}

	/** 
	 * Method execute
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 */
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		RegPaymentCardForm regPaymentCardForm = (RegPaymentCardForm) form;// TODO Auto-generated method stub
		String forwardPage = null;
		PaymentCard paymentCard = regPaymentCardForm.getPaymentCard();
		UserInfo user = regPaymentCardForm.getUser();
		if (registerService.registerPaymentCard(paymentCard,user)) {
			request.setAttribute("Message", "注册支付宝成功");
			request.setAttribute("forwardPage", "userinfo.jsp");
			forwardPage = "success";
		}else {
			request.setAttribute("errorMessage", "注册支付宝失败");
			request.setAttribute("forwardPage", "editPaymentCard.jsp");
			forwardPage = "fail";
		}
		return mapping.findForward(forwardPage);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -