import 要用文件.*
public final class DisplayAllAction extends AbstActionBase {
private Log log =
LogFactory.getLog(this.getClass().getName());
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
Locale locale = getLocale(request);
MessageResources messages = getResources(request);
ActionMessages errors=new ActionMessages();
if (!errors.isEmpty()) {
saveErrors(request, errors);
return (new ActionForward(mapping.getInput()));
}
String strSql = new String("SELECT * FROM " + Constants.TABLENAME + " ORDER BY ID");
HttpSession session = request.getSession();
session.setAttribute(Constants.SQLSTMT_KEY, strSql);
return (mapping.findForward(Constants.FORWARD_SUCCESS));
}
}
请问这里为什么不能用 saveMessage(request, errors);?????????
显示
The method saveErrors(HttpServletRequest, ActionErrors) in the type Action is not applicable for the arguments (HttpServletRequest, ActionMessages)