Multiple message resources with Struts modules

Discussion in 'Java' started by msa, Jul 21, 2003.

  1. msa

    msa Guest

    Hi,

    I'm working with Struts 1.1. I have a small application that consists
    of 4 modules. Each module has its own message resource file, and I
    have that working correctly.

    Now I'd like to add another message resource file that contains common
    messages that all 4 modules can use. I know that I can have multiple
    message resources in a module's config.xml file so long as I use the
    key attribute. That is, I know that the syntax is

    <message-resources parameter="com.myWebSite.CommonResources"
    key="common"/> (under the default message resource line for that
    module)

    and I'm pretty sure that I can reference these messages using lines
    like

    <bean:message bundle="common" key="addButtonLabel"/>

    in my JSPs for that module, but I've tried putting the resource file
    in the parent directory above my module directories and that doesn't
    work. I've tried putting it under the directory of this one module
    and tried using it just in that module, and that doesn't work.

    Where does this file need to go?

    Have I configured it incorrectly?

    Am I referencing the common message resource correctly?

    I just get the error "Cannot find message resources under key common".

    Any help you can offer on this problem (multiple message resource
    files, using a common message resource file among modules) would be
    super appreciated!

    Thanks!
     
    msa, Jul 21, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hari Om
    Replies:
    3
    Views:
    12,231
    Wendy S
    Oct 1, 2003
  2. matt hegarty
    Replies:
    0
    Views:
    618
    matt hegarty
    Apr 5, 2004
  3. Joos Nielsen
    Replies:
    2
    Views:
    1,042
    Ryan Stewart
    Jun 4, 2004
  4. Stuart
    Replies:
    0
    Views:
    740
    Stuart
    Oct 19, 2004
  5. Russell E. Owen
    Replies:
    0
    Views:
    725
    Russell E. Owen
    Sep 8, 2006
Loading...

Share This Page