struts问题!在线等!
在actionform 中
public ActionErrors validate(ActionMapping actionMapping, HttpServletRequest httpServletRequest) {
ActionErrors errors = new ActionErrors();
if ((title== null) || (title.length() < 1))
errors.add("title", new ActionError "error.title.required"));
if ((content== null) || (content.length() < 1))
errors.add("content", new ActionError("error.content.required"));
return errors;
}
来处理表单的错误信息!
但是为什么在一打开jsp 页面就显示错误信息?