1.在Action和beanForm中都可以对提交的数据进行判断
if(englishname.length()==0)
{
errors.add("test",new ActionMessage("errors.test"));
this.saveErrors(request, errors);
return mapping.getInputForward();
}
上面的errors.test必须是在ApplicationResource.properties文件中定义的字符资源
在jsp中定义
<html:errors property="test"/>