检查你的struts-config,要是验证的话,要在action的标签里面加上input=xxxx.jsp才行。

解决方案 »

  1.   

    <action name="SMTellWkgListForm"
    type="com.unihub.svrtool.busman.action.SMTellWkgListAction"
             input="/busman/SMTellWkgList.jsp"//这里
    path="/busman/SMTellWkgListAction">
    <forward name="success"
            path="/busman/SMTellWkgList.jsp"
             redirect="false"/>
    </action>
      

  2.   

    非常感谢,页面没有了错误,但是显示不正确。
    这是我在 ActionForm中的一段判断:
        if ((id == null) || (id.length() < 1))
          errors.add("id",new ActionError("id.error.idrequired"));
        if ((age == null) || (age.length() < 1))
          errors.add("age",new ActionError("age.error.agerequired"));
    就是判断为空时加入错误信息。
    下面是我在 ApplicationResources 中的错误信息:
    id.error.idrequired=<h3><font color="red">id error</font></h3>
    age.error.agerequired=<h3><font color="red">age error</font></h3>结果显示出的错误信息是: null null。不知道是什么道理,谢谢。
      

  3.   

    检查你的web.xml是否有:
        <init-param>
          <param-name>application</param-name>
          <param-value>yourApplicationResources</param-value>
        </init-param>