1、HelloAction.java有出错地方是if (userName.equalsIgnoreCase(badUserName)) 里面2、HelloActionForm.java有出错地方是return errors;后

解决方案 »

  1.   

    new ActionMessage,改成new ActionError
      

  2.   

    public ActionErrors validate  中的错误提示是:
    type Status report
    message No input attribute for mapping path /helloAction
    description The server encountered an internal error (No input attribute for mapping path /helloAction) that prevented it from fulfilling this request.if (userName.equalsIgnoreCase(badUserName)) {中的错误是:
    description The server encountered an internal error () that prevented it from fulfilling this reques
      

  3.   

    第一个地方,错误指出你的Action Mapping里面没有定义input属性,因为你后面写了这句
    return (new ActionForward(mapping.getInput()));
      

  4.   

    验证方法中运行这句就错了,前提我在资源文件中有定义hello.no.username.error的啊
    errors.add("username",new ActionMessage("hello.no.username.error"));