Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-2007

Message-resource for multiple modules

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 1.1.0
    • None
    • Website
    • None
    • Operating System: Windows XP
      Platform: PC
    • 27632

    Description

      Here is the case:
      One webapp with many modules, and each module has it's own struts-config-
      modulename.xml file, and it's own set of properties files. And a default
      struts-config.xml file for the whole webapp. Supposely, each module's
      properties files are config as
      <message-resources key="errors" parameter="xxx.module1.ErrorsResources"/>
      <message-resources key="messages" parameter="xxx.module1.MessagesResources"/>
      ...
      And when use in the application, <bean:message bundle="errors" key="some.key"/>

      However, that doesn't works, got an exception mentioned that the key can not
      be found with errors bundle when the bean:message is rendered. But, when I
      place the same configuration in the default struts-config.xml file, it works.
      The message key can be found with the errors bundle.

      I assume this might be a bug, since each module can have it's own set of
      message-resources.

      However, I do another test on it by config each module with only one message-
      resouce, and they are configed as the default with out a key value. And that
      seems to work.

      Attachments

        Activity

          People

            Unassigned Unassigned
            li7132@yahoo.com David Li
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: