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

📄 logonform.java

📁 struts+hibernate BBS mysql数据库 功能基本齐全
💻 JAVA
字号:
package com.elan.forum.formBean;

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 LogonForm extends ActionForm{
	private String username = null;
	private String password = null;
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	/*public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		ActionErrors errors = new ActionErrors();
		if(isEmptyStr(username)) {
			errors.add("userlogonerr", new ActionError("username.not.null"));
			if(isEmptyStr(password)) {
				errors.add("userlogonerr", new ActionError("username.password.not.null"));
			}
		} else if(isEmptyStr(password)){
			errors.add("userlogonerr", new ActionError("password.not.null"));
		}
		return errors;
	}

	private boolean isEmptyStr(String string) {
		if(null == string) return true;
		if ("".equals(string.trim()) || 0 == string.length()) {
			return true;
		}
		return false;
	}*/
}

⌨️ 快捷键说明

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