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

📄 reg123form.java

📁 在一个大的项目中建立小的子应用,这样就可以一个项目同时有几个小分队开发.可以完成子应用的相互调用.
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package t0522;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

/** 
 * MyEclipse Struts
 * Creation date: 05-22-2008
 * 
 * XDoclet definition:
 * @struts.form name="reg123Form"
 */
public class Reg123Form extends ActionForm {
	/*
	 * Generated fields
	 */

	/** p1 property */
	private String p1;

	/** username property */
	private String username;

	/** p2 property */
	private String p2;

	/*
	 * Generated Methods
	 */

	/** 
	 * Method validate
	 * @param mapping
	 * @param request
	 * @return ActionErrors
	 */
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		ActionErrors errors = new ActionErrors();//创建一个错误集合对象

       // if (name.equals("maomao"))
         //   errors.add("username", new ActionMessage("mao.error"));
		if(username.length()<6)
			errors.add("eee1",new ActionMessage("reg123.u.e1"));
		if(!p1.equals(p2))
			errors.add("eee3",new ActionMessage("ghfhgfgh"));
		return errors;
	}

	/** 
	 * Method reset
	 * @param mapping
	 * @param request
	 */
	public void reset(ActionMapping mapping, HttpServletRequest request) {
		// TODO Auto-generated method stub
	}

	/** 
	 * Returns the p1.
	 * @return String
	 */
	public String getP1() {
		return p1;
	}

	/** 
	 * Set the p1.
	 * @param p1 The p1 to set
	 */
	public void setP1(String p1) {
		this.p1 = p1;
	}

	/** 
	 * Returns the username.
	 * @return String
	 */
	public String getUsername() {
		return username;
	}

	/** 
	 * Set the username.
	 * @param username The username to set
	 */
	public void setUsername(String username) {
		this.username = username;
	}

	/** 
	 * Returns the p2.
	 * @return String
	 */
	public String getP2() {
		return p2;
	}

	/** 
	 * Set the p2.
	 * @param p2 The p2 to set
	 */
	public void setP2(String p2) {
		this.p2 = p2;
	}
}

⌨️ 快捷键说明

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