📄 loginform.java
字号:
//Created by MyEclipse Struts// XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_4.0.1/xslt/JavaClass.xslpackage math.login.controller;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: 11-03-2006 * * XDoclet definition: * @struts.form name="loginForm" */public class LoginForm extends ActionForm { // --------------------------------------------------------- Instance Variables // --------------------------------------------------------- Methods /** * Method validate * @param mapping * @param request * @return ActionErrors */ private String username; private String password; //private int users_grade; private String rand; public ActionErrors validate( ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if ( (username == null) || (username.length() < 1)) errors.add("username", new ActionError("error.username.required")); else if ( (password == null) || (password.length() < 1)) errors.add("password", new ActionError("error.password.required")); // else if ( ( users_grade!= 1) &&( users_grade!= 2) ) // errors.add("users_grade", new ActionError("error.users_grade.required")); // TODO Auto-generated method stub return errors; // TODO Auto-generated method stub } /** * Method reset * @param mapping * @param request */ public void reset(ActionMapping mapping, HttpServletRequest request) { } /*public int getUsers_grade() { // return users_grade; } public void setUsers_grade(int users_grade) { this.users_grade = users_grade; }*/ public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getRand() { return rand; } public void setRand(String rand) { this.rand = rand; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -