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

📄 useregform.java

📁 这是一个通过来struts和hiberate实现的用户注册登陆源代码
💻 JAVA
字号:
//Created by MyEclipse Struts// XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_4.0.1/xslt/JavaClass.xslpackage com.mycompany.struts.form;import javax.servlet.http.HttpServletRequest;import org.apache.struts.action.ActionError;import org.apache.struts.action.ActionErrors;import org.apache.struts.action.ActionForm;import org.apache.struts.action.ActionMapping;/**  * MyEclipse Struts * Creation date: 12-24-2005 *  * XDoclet definition: * @struts.form name="useRegForm" */public class UseRegForm extends ActionForm {	// --------------------------------------------------------- Instance Variables	/** pw2 property */	private String pw2;	/** pw property */	private String pw;	/** name property */	private String name;	// --------------------------------------------------------- Methods	/** 	 * Method validate	 * @param mapping	 * @param request	 * @return ActionErrors	 */	public ActionErrors validate(		ActionMapping mapping,		HttpServletRequest request) {		ActionErrors nerror=new ActionErrors();		if(this.name==null||this.name.length()==0||this.pw==null||this.pw.length()==0||this.pw2==null||this.pw2.length()==0){			nerror.add("name",new ActionError("nopnull"));		}else{			if(!this.pw.equals(this.pw2)){				nerror.add("password",new ActionError("pwnoteq"));			}		}		return nerror;	}	/** 	 * Method reset	 * @param mapping	 * @param request	 */	public void reset(ActionMapping mapping, HttpServletRequest request) {		// TODO Auto-generated method stub	}	/** 	 * Returns the pw2.	 * @return String	 */	public String getPw2() {		return pw2;	}	/** 	 * Set the pw2.	 * @param pw2 The pw2 to set	 */	public void setPw2(String pw2) {		this.pw2 = pw2;	}	/** 	 * Returns the pw.	 * @return String	 */	public String getPw() {		return pw;	}	/** 	 * Set the pw.	 * @param pw The pw to set	 */	public void setPw(String pw) {		this.pw = pw;	}	/** 	 * Returns the name.	 * @return String	 */	public String getName() {		return name;	}	/** 	 * Set the name.	 * @param name The name to set	 */	public void setName(String name) {		this.name = name;	}}

⌨️ 快捷键说明

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