struts-user  

Re: Cannot find message resources under key org.apache.struts.action.MESSAGE

Annie Chang
Tue, 26 Mar 2002 17:55:50 -0800

Re: Cannot find message resources under key org.apache.struts.action.MESSAGEHi,
Sorry for answer myself, I found my default, I forgot to add the  tag 
<message-resources in struts-config.xml.
But the surprised thing is  only tag <html: can not be recognized, and tag <bean: is 
OK.
Hope it can be useful for guys who have the same problem.

Annie
  ----- Original Message ----- 
  From: Annie Chang 
  To: Struts Users Mailing List 
  Sent: Monday, March 25, 2002 9:22 PM
  Subject: RE: Cannot find message resources under key org.apache.struts.action.MESSAGE


  Hi, Thanks,
  The error only occurs when I use <html:checkbox OR <html:text.  
  But <bean:write is OK, 
  when delete the tag <html:checkbox , everything is OK. So what's matter, do you know?
  Thank in adv. 

    <logic:iterate id="order" name="OrdersForm" property="orderList">
    <tr>
       <td>
          <html:checkbox name="order" property="_selected_" indexed="true" 
value="true"/>
       </td>
       <td><div align="left"><font face="Verdana, Arial, Geneva, sans-serif" size="-2">
          <bean:write name="order" property="orderNumber" filter="true"/>
          </font></div>
       </td>

  ApplicationDispatcher[]: Servlet.service() for servlet debugjsp threw exception
  javax.servlet.ServletException: Cannot find message resources under key 
org.apache.struts.action.MESSAGE
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:480)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
   at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)

    -----Original Message----- 
    From: [EMAIL PROTECTED] 
    Sent: Mon 3/25/2002 8:55 PM 
    To: [EMAIL PROTECTED] 
    Cc: 
    Subject: Re: Cannot find message resources under key 
org.apache.struts.action.MESSAGE


    It means that u should have your application resource ( MESSAGE file ) under
    the package org.apache.struts.action and the fully qualified class name
    should be mapped in to the web.xml file 

    the sample code of web.xml is as :
     <web-app>
      <display-name>Cocoon2 Demo</display-name>
      <description>Demo application for Cocoon2</description>
    + <servlet>
      <servlet-name>Cocoon2</servlet-name>
      <display-name>Cocoon2</display-name>
      <description>The main Cocoon2 servlet</description>
    - <!--
          In cases you're facing class loader problems you can alternatively
          use the following servlet-class instead of the normal one

         
    <servlet-class>org.apache.cocoon.servlet.ParanoidCocoonServlet</servlet-class>

       

      -->
      <servlet-class>org.apache.cocoon.servlet.CocoonServlet</servlet-class>
    - <!--
          This parameter points to the main configuration file for Cocoon.
          Note that the path is specified in absolute notation but it will be
          resolved relative to the servlets webapp context path
       

      -->
    - <init-param>
      <param-name>configurations</param-name>
      <param-value>/cocoon.xconf</param-value>
      </init-param>
    - <!--
          This parameter tells cocoon to load all the required libraries into
          it's own classloader instead of trusting the Servlet Vendor's
          classloader.  If you experience strange classloader issues,
          try setting this parameter to "true".
       

      -->
    - <init-param>
      <param-name>init-classloader</param-name>
      <param-value>false</param-value>
      </init-param>
    - <!--
          This parameter indicates the configuration file of the LogKit management
       

      -->
    - <init-param>
      <param-name>logkit-config</param-name>
      <param-value>/WEB-INF/logkit.xconf</param-value>
      </init-param>
    - <!--
          This parameter indicates the category id of the logger from the LogKit
          configuration used by the CocoonServlet.
       

      -->
    - <init-param>
      <param-name>servlet-logger</param-name>
      <param-value>access</param-value>
      </init-param>
    - <!--
          This parameter indicates the category id of the logger from the LogKit
          management configuration for the Cocoon engine.
          This logger is used for all components described in the cocoon.xconf
          and sitemap.xmap file not having specified a logger with the
          logger="..." attribute in the component configuration file.
       

      -->
    - <init-param>
      <param-name>cocoon-logger</param-name>
      <param-value>core</param-value>
      </init-param>
    - <!--
          This parameter indicates the log level to use throughout startup of the
    system.
          As soon as the logkit.xconf the setting of the logkit.xconf
    configuration is
          used instead! Only for startup and if the logkit.xconf is not
    readable/available
          this log level is of importance.

          Available levels are:
            DEBUG:        prints all level of log messages.
            INFO:         prints all level of log messages except DEBUG ones.
            WARN:         prints all level of log messages except DEBUG and INFO
    ones.
            ERROR:        prints all level of log messages except DEBUG, INFO and
    WARN ones.
            FATAL-ERROR: prints only log messages of this level
       

      -->
    - <init-param>
      <param-name>log-level</param-name>
      <param-value>DEBUG</param-value>
      </init-param>
    - <!--

          Allow reinstantiating (reloading) of the cocoon instance. If this is
          set to "yes" or "true", a new cocoon instance can be created using
          the request parameter "cocoon-reload".
       

      -->
    - <init-param>
      <param-name>allow-reload</param-name>
      <param-value>yes</param-value>
      </init-param>
    - <!--

          This parameter is used to list classes that should be loaded
          at initialization time of the servlet.
          Usually this classes are JDBC Drivers used
       

      -->
    - <init-param>
      <param-name>load-class</param-name>
    - <param-value>
    - <!--
     For IBM WebSphere:
            com.ibm.servlet.classloader.Handler

      -->
    - <!--  For Database Driver:
      -->
      org.hsqldb.jdbcDriver
    - <!--
     For parent ComponentManager sample:
            org.apache.cocoon.samples.parentcm.Configurator
           

      -->
      </param-value>
      </init-param>
    - <!--

          This parameter allows to specify where Cocoon should put files
          which are uploaded by the upload.xsp sample. The path specified
          is always relative to the context path of the servlet.
          The default directory is "upload-dir" in the work-directory

        <init-param>
          <param-name>upload-directory</param-name>
          <param-value>/WEB-INF/work/upload-dir</param-value>
        </init-param>
       

      -->
    - <!--

          This parameter allows to specify where Cocoon should put files
          which are cached by the storing class. The path specified
          is always relative to the context path of the servlet.
          The default directory is "cache-dir" in the work-directory

        <init-param>
          <param-name>cache-directory</param-name>
          <param-value>/WEB-INF/work/cache-dir</param-value>
        </init-param>
       

      -->
    - <!--

          This parameter allows to specify where Cocoon should put it's
          working files. The path specified is always relative to the
          context path of the Cocoon servlet.
          Usually it is obtained from the servlet engine.

        <init-param>
          <param-name>work-directory</param-name>
          <param-value>/WEB-INF/work</param-value>
        </init-param>
       

      -->
    - <!--
          This parameter allows to specify additional directories or jars
          which Cocoon should put into it's own classpath.
          Note that you must separate them using the platforms path.separator
          (":" for *nix and ";" for Windows systems). Also note that absolute
          pathes are take as such but relative pathes are rooted at the context
          root of the Cocoon servlet.

        <init-param>
          <param-name>extra-classpath</param-name>
         
    <param-value>WEB-INF/extra-classes1:/[YOU-ABSOLUTE-PATH-TO]/own.jar</param-val

    ue>
        </init-param>
       

      -->
    - <!--
          This parameter allows you to select the parent component manager.
          The class will be instantiated via the constructor that takes a single
          String as a parameter. That String will be equal to the text after the
          '/'.

          Cocoon honors the Loggable and Initializable interfaces for this class,
          if it implements them.
       
          If you uncomment the following lines the parent CM is set to the Parent
    CM sample, which will look up
          a configuration via JNDI at
    org/apache/cocoon/samples/parentcm/ParentCMConfiguration
          and use it.
        <init-param>
          <param-name>parent-component-manager</param-name>
         
    <param-value>org.apache.cocoon.samples.parentcm.ParentComponentManager/org/apa

    che/cocoon/samples/parentcm/ParentCMConfiguration</param-value>
        </init-param>
       

     
     
       





    - <servlet>
      <servlet-name>action</servlet-name>
      <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    - <init-param>
      <param-name>application</param-name>
     
    <param-value>com.countrywide.cgt.gap.gts.userworkflow.action.ApplicationResour

    ces</param-value>
      </init-param>

    --
    To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
    For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>