我放在根目录下了,因为我的struts-config.xml中这样配置了:<message-resources null="false" parameter="ApplicationResources" />

解决方案 »

  1.   

    我想是你的struts程序有问题吧,这个错误与ApplicationResources.properties没有关系。
      

  2.   

    很有可能是因为你的属性文件里写的key 和你在jsp里调用的key 不一致,造成的.
      

  3.   

    你的意思是不是说在加上:<message-resources null="false" parameter="ApplicationResources" />以前是好的?如果是,那就是因为你的jsp中和ApplicationResources中定义的key不一样,你把null设为true看看!
      

  4.   

    我忘了说了,是服务器刚一运行就有这么多提示,程序中的页面流是可以走通的,只是找不到ApplicationResources.properties无法进行数据校验。
      

  5.   

    问题的核心在这:
    2004-8-27 16:10:31 org.apache.struts.util.PropertyMessageResources <init>
    信息: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
    2004-8-27 16:10:31 org.apache.struts.util.PropertyMessageResources <init>
    信息: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
    2004-8-27 16:10:32 org.apache.struts.util.PropertyMessageResources <init>
    信息: Initializing, config='ApplicationResources', returnNull=true为什么服务器一运行就提示这些?
      

  6.   

    可能是你tomcat的版本不同,我用的4.1.30一起动就会以有这些信息出现
    如果换成其他版本,就没有
      

  7.   

    谢谢qjhaaaaa() !!!
    但我部署在Weblogic下还是一样啊!
    Weblogic启动的提示如下:
    2004-8-27 17:41:00 org.apache.struts.util.PropertyMessageResources <init>
    信息: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
    2004-8-27 17:41:00 org.apache.struts.util.PropertyMessageResources <init>
    信息: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
    2004-8-27 17:41:00 org.apache.struts.util.PropertyMessageResources <init>
    信息: Initializing, config='ApplicationResources', returnNull=true
    和以前一样!是不是我的Struts有问题啊?我的Struts是1.1的,是JBuilderX自带的。
      

  8.   

    这些提示都是正常的提示,并没有报错
    和ApplicationResources.properties也没有配置上的关系
    是你的代码错了
      

  9.   

    估计是代码错误,或者是KEY的对应不正确
    那些提示没有问题
      

  10.   

    谁能给我一整套的数据校验的简单示例啊?我自己捣鼓了一周了,还是不知道错在哪里了。极度郁闷~~~~
    我想我的ActionForm中的validate方法写的没有问题啊,代码如下:
    public ActionErrors validate(ActionMapping actionMapping,
                                   HttpServletRequest httpServletRequest) {
        ActionErrors errors = new ActionErrors();
        if (userId.equals(null) || userId.equals("")) {
          errors.add("userId", new ActionError("error.userId.required"));
        }
        if (password.equals(null) || password.equals("")) {
          errors.add("password", new ActionError("error.password.required"));
        }
        return errors;
      }
    为什么每次不输入数据,总看不到ApplicationResources.properties中的错误信息,却总显示:
    No input attribute for mapping path /loginAction
    The server encountered an internal error (No input attribute for mapping path /loginAction) that prevented it from fulfilling this request.
      

  11.   

    如果你是用JBuilder写的,试一下重新编译工程再发布。
      

  12.   

    你没有指定input属性,如下面的配置项:
    <action path="/processCustomerRegister"
             type="seu.yuch.CustomerRegisterAction"
    name="customerRegisterForm"
    validate="true"
    scope="request"
    input="/jsp/customerRegister.jsp">
    <forward name="success" path="/jsp/registerResult.jsp" />
    <forward name="failure" path="/jsp/customerRegister.jsp" />
    </action>而且在registerRegister.jsp页面中须有<html:errors />,这样才会显示相应的错误信息。
      

  13.   

    还是没有啊!
    我的配置项如下:
    <action name="loginActionForm" path="/loginAction" scope="request" type="cwx.common.LoginAction" validate="true" input="/login.jsp">
          <forward name="success" path="/main.jsp" />
        </action>
    编译运行:http://localhost:8080/StrutsModule/loginAction.do
    当我什么都不输入提交,无任何反应,而URL变成了:
    http://localhost:8080/StrutsModule/loginAction.do;jsessionid=6D4187A9923CA7A323D8B0A7BB84913A
      

  14.   

    不是没有反应,而是你提交的数据验证没有通过,返回到你的表单页,之所以看不到任何东西,是因为你没有在页面上加任何提示,把下句拷到你的表单页看看:
    <logic:messagesPresent> 
      <ul>
      <html:messages id="error"> 
      <li>
        <bean:write name="error"/>
      </li>
      </html:messages>
      </ul>
    </logic:messagesPresent>
      

  15.   

    加了后报HTTP Status 500的错误!明细如下:
    Message:
    Internal Server Error
    Description: 
    The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    Exception:
    javax.servlet.ServletException: Cannot find bean error in any scope
     at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471)
     at org.apache.jsp.login$jsp._jspService(login$jsp.java:390)
     ......
    Root:
     cause javax.servlet.jsp.JspException: Cannot find bean error in any scope
     at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:938)
     at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:286)
     at org.apache.jsp.login$jsp._jspService(login$jsp.java:156)
     ......
      

  16.   

    问题的关键在于你的web.xml中是否有所标明,例如:
    <init-param>
          <param-name>application</param-name>
          <param-value>xxx.util.ApplicationResources_zh_CN</param-value>
        </init-param>
    再有就是一般要把ApplicationResources.properties另放目录
      

  17.   

    终于出现了!连pcdll(.net)的那段语句也看到了!真是感谢各位了!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!