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

📄 office_chpwdform.java

📁 这个程序是花了好几十万请人开发的
💻 JAVA
字号:
/* *  * @author 郑文金 * * 这个form用于在"网上办公室"中修改密码 * */package 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;public class Office_ChpwdForm extends ActionForm {	// --------------------------------------------------------- Instance Variables	/** password property */	private String password;	/** new2password property */	private String new2password;	/** new1password property */	private String new1password;	// --------------------------------------------------------- Methods	/** 	 * Method validate	 * @param ActionMapping mapping	 * @param HttpServletRequest request	 * @return ActionErrors	 */	public ActionErrors validate(		ActionMapping mapping,		HttpServletRequest request) 	{		ActionErrors errors=new ActionErrors();				if((new1password.equals(""))||(new1password.length()<4)||(!(new1password.equals(new2password)))||		(new2password.equals("")))//验证新密码的有效性		{			this.reset(mapping,request);			errors.add("newpassword",new ActionError("office_newpassword.error"));//不为空		}		return errors;	}	/** 	 * Method reset	 * @param ActionMapping mapping	 * @param HttpServletRequest request	 */	public void reset(ActionMapping mapping, HttpServletRequest request) {		password = "";		new2password = "";		new1password = "";	}	/** 	 * 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 new2password.	 * @return String	 */	public String getNew2password() {		return new2password;	}	/** 	 * Set the new2password.	 * @param new2password The new2password to set	 */	public void setNew2password(String new2password) {		this.new2password = new2password;	}	/** 	 * Returns the new1password.	 * @return String	 */	public String getNew1password() {		return new1password;	}	/** 	 * Set the new1password.	 * @param new1password The new1password to set	 */	public void setNew1password(String new1password) {		this.new1password = new1password;	}}

⌨️ 快捷键说明

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