loginform.java

来自「First of all, the Applet-phone is a SIP 」· Java 代码 · 共 73 行

JAVA
73
字号
/* * LoginForm.java * * Created on July 3, 2003, 12:03 PM */package gov.nist.struts.webapp.login;/** This JavaBean form is populated through the login page and will be pass to an * Action * @author DERUELLE Jean */public class LoginForm extends org.apache.struts.action.ActionForm {    /**     * The user name of the user who upload the service     */    protected String userName=null;    /**     * The password of the user who upload the service     */    protected String password=null;    /** Retrieve the user name of the user who upload the service     * @return the user name     */    public String getUserName() {            return userName;    }    /** Set the user name of the user who upload the service     * @param userName -  the user name     */    public void setUserName(String userName) {            this.userName = userName;    }    /**     * Retrieve the password of the user who upload the service     * @return the password     */    public String getPassword() {            return password;    }    /** Set the password of the user who upload the service     * @param password -  the user password     */    public void setPassword(String password) {            this.password = password;    }        /**     * @see org.apache.struts.action.ActionForm#reset(org.apache.struts.action.ActionMapping actionMapping,javax.servlet.http.HttpServletRequest httpServletRequest)     */    public void reset(org.apache.struts.action.ActionMapping mapping,javax.servlet.http.HttpServletRequest request) {        userName=null;        password=null;    }        /**      * @see org.apache.struts.action.ActionForm#validate(org.apache.struts.action.ActionMapping actionMapping, javax.servlet.http.HttpServletRequest httpServletRequest)     */    public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping actionMapping, javax.servlet.http.HttpServletRequest httpServletRequest) {        if ((userName== null) || (userName.length() < 1))            userName="guest";        if ((password== null) || (password.length() < 1))            password="guest";          return null;    }    }

⌨️ 快捷键说明

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