level 9

1.如果第一次填写正确的用户名和密码时,登录成功;如果第一次不填写用户名和密码时,会提示以上错误,而第二次填写正确的用户名和密码时,仍会提示这个错误,这是为什么?

多次不填写用户名和密码时,会出现重复的提示,怎么解决?主要的程序代码如下:
login.jsp
<s:fielderror cssStyle="color:red">
<s:param>user.uname</s:param>
</s:fielderror>
用户名:<input type="text" name="uname">
<s:fielderror cssStyle="color:red">
<s:param>user.password</s:param>
</s:fielderror>
密码:<input type="password" name="password">
LoginAction.java
public String execute() throws Exception
{
User user=userService.checkUser(uname, password);
if(user==null){
System.out.println("用户不存在");return INPUT;}
else{
ActionContext.getContext().getSession().put("uno", user.getUno());
ActionContext.getContext().getSession().put("uname", user.getUname());
ActionContext.getContext().getSession().put("password", user.getPassword());
return SUCCESS;}
}
public void validate(){
if(this.getUname()==null || "".equals(this.getUname().trim()))this.addFieldError("user.uname", "请填写用户名");
if(this.getPassword()==null || "".equals(this.getPassword().trim()))this.addFieldError("user.password", "请填写密码");
}
路过的大虾们,帮帮小弟吧,不甚感激!!!