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

📄 loginform.java

📁 本系统是用NetBeans IDE 6.1所写
💻 JAVA
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package com.online.forms;import com.online.pojo.User;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpSession;import org.apache.struts.action.*;import org.apache.struts.action.ActionMapping;import org.apache.struts.action.ActionMessage;/** * * @author Administrator */public class LoginForm extends org.apache.struts.action.ActionForm {        private String username;    private String password;   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 ( username.length()==0) {            errors.add("username", new ActionMessage("error.usernameField.required"));        }        if (password.length()==0) {            errors.add("password", new ActionMessage("error.passwordField.required"));        }                             return errors;   }}

⌨️ 快捷键说明

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