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

📄 admineraddform.java

📁 struts spring hibernate 自已写的
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.hb.gf.form;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

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: 07-22-2008
 * 
 * XDoclet definition:
 * @struts.form name="admineraddForm"
 */
public class AdmineraddForm extends ActionForm {
	/*
	 * Generated fields
	 */

	/** pwordd property */
	private String pwordd;

	/** adminer property */
	private String adminer;

	/** high property */
	private String high;

	/** mycode property */
	private String mycode;

	/** pword property */
	private String pword;

	/*
	 * Generated Methods
	 */

	/** 
	 * Method validate
	 * @param mapping
	 * @param request
	 * @return ActionErrors
	 */
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		// TODO Auto-generated method stub
          ActionErrors error = new ActionErrors();
		
		HttpSession   session   =   request.getSession(); 
		String sessionid=session.getAttribute("jcmsrandomchar").toString();
		if (this.pword == null || "".equals(this.pword)) {
			error.add("name",new ActionMessage("password.null"));
		}
		if (this.pwordd == null || "".equals(this.pwordd)) {
			error.add("name",new ActionMessage("passwordd.null"));
		}
		else if (!this.pword.equals(this.pwordd)) {
			error.add("name",new ActionMessage("password.again"));
		}
		if (this.adminer == null || "".equals(this.adminer)) {
			error.add("name", new ActionMessage("name.null"));
		}
		if (this.mycode == null || "".equals(this.mycode)) {
			error.add("name", new ActionMessage("mycode.null"));
		}
		else if (!sessionid.equals(this.mycode))
		{
			error.add("name", new ActionMessage("mycode.error"));	
		//error.add("name", new ActionMessage(sessionid+"相比"+this.mycode,false));
		//上面能将sessionid+"相比"+this.mycode显示出来
		}
		return error;
	}

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

	/** 
	 * Returns the pwordd.
	 * @return String
	 */
	public String getPwordd() {
		return pwordd;
	}

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

	/** 
	 * Returns the adminer.
	 * @return String
	 */
	public String getAdminer() {
		return adminer;
	}

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

	/** 
	 * Returns the high.
	 * @return String
	 */
	public String getHigh() {
		return high;
	}

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

	/** 
	 * Returns the mycode.
	 * @return String
	 */
	public String getMycode() {
		return mycode;
	}

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

	/** 
	 * Returns the pword.
	 * @return String
	 */
	public String getPword() {
		return pword;
	}

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

⌨️ 快捷键说明

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