struts2错误验证
时间:2014-04-29 13:18:21
收藏:0
阅读:342
在登陆的时候一般要用错误验证功能。效果如图:
在action层的写法:
this.addActionError("用户名或密码错误");在jsp页面上取值:
<s:actionerror></s:actionerror>记得在jsp页面添加<%@ taglib prefix="s" uri="/struts-tags"%>就可以了
评论(0)