📄 loginform.java
字号:
//Created by MyEclipse Struts// XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_4.0.1/xslt/JavaClass.xslpackage edu.sccp.qyj.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;/** * MyEclipse Struts * Creation date: 02-12-2007 * * XDoclet definition: * @struts.form name="loginForm" */public class LoginForm extends ActionForm { // --------------------------------------------------------- Instance Variables // --------------------------------------------------------- Methods private String userName; private String userPassword; /** * Method validate * @param mapping * @param request * @return ActionErrors */ public ActionErrors validate( ActionMapping mapping, HttpServletRequest request) { // TODO Auto-generated method stub ActionErrors errors = new ActionErrors(); if(this.userName==null || (this.userName.length()<1)){ errors.add("username",new ActionError("login.jsp.error.nullusername")); } if(this.userPassword==null || (this.userPassword.length()<1)){ errors.add("userpassword",new ActionError("login.jsp.error.nulluserpassword")); } return errors; } /** * Method reset * @param mapping * @param request */ public void reset(ActionMapping mapping, HttpServletRequest request) { // TODO Auto-generated method stub this.userName=null; this.userPassword=null; } /** * @return 返回 userName。 */ public String getUserName() { return userName; } /** * @param userName 要设置的 userName。 */ public void setUserName(String userName) { this.userName = userName; } /** * @return 返回 userPassword。 */ public String getUserPassword() { return userPassword; } /** * @param userPassword 要设置的 userPassword。 */ public void setUserPassword(String userPassword) { this.userPassword = userPassword; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -