日期:2014-05-18  浏览次数:20687 次

一个验证的问题,急 !!!!!!!
public   ActionErrors   validate(ActionMapping   mapping,
HttpServletRequest   request)   {
//   TODO   Auto-generated   method   stub
ActionErrors   errors=new   ActionErrors();
if(username.equals( "guest ")||username.equals( " "))
{
          errors.add( "username ",new   ActionMessage(mytest.error));
}

return   errors;
}

myeclpise里   写了个login.java   ,这段中   errors.add( "username ",new   ActionMessage(mytest.error));     它出现了个错误提示ActionMessager   cannot   be   to   resolved   to   a   type       ,是什么意思   ,是不是要倒入一个ActionMessager类阿?怎么导入,说具体点,行吗?



------解决方案--------------------
用struts,当然就要把struts-core.jar包加到libraries里去。