findpasswordform.java
来自「数学网」· Java 代码 · 共 61 行
JAVA
61 行
package math.reg.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;
public class FindPasswordForm extends ActionForm{
private String lost_name;
private String pass_pro;
private String pass_ans;
public String getLost_name() {
return lost_name;
}
public void setLost_name(String lost_name) {
this.lost_name = lost_name;
}
public String getPass_ans() {
return pass_ans;
}
public void setPass_ans(String pass_ans) {
this.pass_ans = pass_ans;
}
public String getPass_pro() {
return pass_pro;
}
public void setPass_pro(String pass_pro) {
this.pass_pro = pass_pro;
}
public ActionErrors validate(
ActionMapping mapping,
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if ( (lost_name == null) || (lost_name.length() < 1))
errors.add("lost_name", new ActionError("error.username.required"));
else if ( (pass_pro == null) || (pass_pro.length() < 1))
errors.add("pass_pro", new ActionError("error.pass_pro.required"));
else if ( (pass_ans == null) || (pass_ans.length() < 1))
errors.add("pass_ans", new ActionError("error.pass_ans.required"));
return errors;
}
public void reset(ActionMapping mapping, HttpServletRequest request) {
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?