logonform.java

来自「100多M的J2EE培训内容」· Java 代码 · 共 31 行

JAVA
31
字号
package firststrut;import org.apache.struts.action.*;import javax.servlet.http.*;public class LogonForm extends ActionForm {  private String password;  private String username;  public void setPassword(String password) {    this.password = password;  }  public String getPassword() {    return password;  }  public void setUsername(String username) {    this.username = username;  }  public String getUsername() {    return username;  }  public ActionErrors validate(ActionMapping actionMapping, HttpServletRequest request) {    /**@todo: finish this method, this is just the skeleton.*/    ActionErrors errors=new ActionErrors();    if(username==null || password==null){      errors.add(username,new ActionError("cannot be null"));    }    return errors;  }  public void reset(ActionMapping actionMapping, HttpServletRequest httpServletRequest) {  }}

⌨️ 快捷键说明

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