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

📄 loginform.java

📁 STRUTS的简单例子.用户登陆例子,初学者看!包括源码!
💻 JAVA
字号:
//Created by MyEclipse Struts// XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_4.1.1/xslt/JavaClass.xslpackage com.yourcompany.struts.form;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: 04-03-2008 *  * XDoclet definition: * @struts.form name="loginForm" */public class LoginForm extends ActionForm {	// --------------------------------------------------------- Instance Variables	/** password property */	private String password;	/** name property */	private String name;	// --------------------------------------------------------- Methods	/** 	 * Method validate	 * @param mapping	 * @param request	 * @return ActionErrors	 */	public ActionErrors validate(		ActionMapping mapping,		HttpServletRequest request) {		ActionErrors errors=new ActionErrors();		if(this.name==null||"".equals(this.name))		{			errors.add("name",new ActionMessage("name.null")) ;		}		if(this.password==null||"".equals(this.password))		{			errors.add("name",new ActionMessage("password.null")) ;		}		return errors;	}		/** 	 * Method reset	 * @param mapping	 * @param request	 */	public void reset(ActionMapping mapping, HttpServletRequest request) {		// TODO Auto-generated method stub	}	/** 	 * Returns the password.	 * @return String	 */	public String getPassword() {		return password;	}	/** 	 * Set the password.	 * @param password The password to set	 */	public void setPassword(String password) {		this.password = password;	}	/** 	 * 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 + -