📄 loginform.java
字号:
/* * 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -