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

📄 registeraccountaction.java

📁 滑动窗口仿真程序
💻 JAVA
字号:
/**
 * 
 */
package com.tarena.account.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.springframework.context.ApplicationContext;
import org.springframework.web.struts.ActionSupport;

import com.tarena.account.form.RegisterAccountForm;
import com.tarena.service.IAccountService;

/**
 * @author dong xuyuan
 * 
 */
public class RegisterAccountAction extends ActionSupport {
	
	

	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm actionForm,
			HttpServletRequest request, HttpServletResponse response) throws Exception {
		
		System.out.println("enter the register account action");
		ApplicationContext ctx = this.getWebApplicationContext();
		
		IAccountService accountServcie = (IAccountService)ctx.getBean("accountservice");
		RegisterAccountForm form = (RegisterAccountForm)actionForm;
		
		
		accountServcie.registerAccount(form.getUsername(), form.getPassword(), form.getDescription());
		
		
		return mapping.findForward("success");
	}


}

⌨️ 快捷键说明

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