📄 adminloginform.java
字号:
/* * Generated by MyEclipse Struts * Template path: templates/java/JavaClass.vtl */package book.jsj0707.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: 01-10-2009 * * XDoclet definition: * @struts.form name="adminLoginForm" */public class AdminLoginForm extends ActionForm { /* * Generated fields */ /** name property */ private String name; /** password property */ private String password; /* * Generated Methods */ /** * Method validate * @param mapping * @param request * @return ActionErrors */ public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if (name == null || name.length() == 0) { errors.add("name", new ActionMessage("login.jsp.name")); } if (password == null || password.length() == 0) { errors.add("password", new ActionMessage("login.jsp.password")); } return errors; } /** * Method reset * @param mapping * @param request */ public void reset(ActionMapping mapping, HttpServletRequest request) { // TODO Auto-generated method stub } /** * 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; } /** * 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; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -