快急死了,总提示*** is deprecated 系统提示the type ActionError is deprecated。这个方法已经不推荐使用了,大概是你看的教程太老了,找一个新一点的吧。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 那为什么会不显示,我在.properties文件中定义的error.password.required呢,我看过了,文件发布了位置都没有问题呢。 public ActionErrors validate(ActionMapping mapping,HttpServletRequest request){ ActionErrors errors=new ActionErrors(); if ((username==null) || (username.length()<1)) { errors.add("username",new ActionMessage("error.username.required",username)); } if ((password==null) || (password.length()<1)) { errors.add("password",new ActionMessage("error.password.required",password)); } return errors;}我把ActionError改用ActionMessage,结果还是什么也不显示。为什么会这样呢? nod!change ActionError to ActionMessage.see some other tutorial in struts src package errors.add("password",new ActionMessage("error.password.required",password));我用的已经是ActionMessage了 检查你的页面有没有调用html:error标签。 ActionError改用ActionMessageActionErrors改用ActionMessages hibernate3用Criteria查询时怎么返回Map对象 实现数据库JDBC驱动的操作 struts2 登陆身份判断问题 在weblogic里部署JDBC后,在weblogic重起的时候,指定让他执行一些SQL,完成清理工作 Jboss服务器上传图片的问题 关于用java做点餐系统的设计问题 求助联动菜单问题 struts问题,谢 resin服务器如何绑定域名啊,急... 利用struts自带的数据连接池连接数据库 java写入sqlServer数据库里后,回车换行符丢失? 一个比较急的小问题!!!求救~
{
ActionErrors errors=new ActionErrors();
if ((username==null) || (username.length()<1))
{
errors.add("username",new ActionMessage("error.username.required",username));
}
if ((password==null) || (password.length()<1))
{
errors.add("password",new ActionMessage("error.password.required",password));
}
return errors;
}
我把ActionError改用ActionMessage,结果还是什么也不显示。
为什么会这样呢?
ActionErrors改用ActionMessages