Get only standard message resource values

  • Michael Decker
    Michael Decker

    I'm using "MessageResources Impls" ( to get my message resources out of my database.... I've used this Instruction to install:

    But now, i get only the default messages... if I set with setLocale(Locale.GERMAN) (at Action-Class), it doesn't change anything... I've testet some cases... Default value of getLocale() is de_DE, if I delete the default message in my db, so I get an exeption, that struts misses message....

    But if I use "normal" resource-files, it works!

    It's saved as:

    subApp       bundleKey       locale       msgKey       val
                de     de
                de_DE     de_DE

    I've generated debug output... Perhaps that could be tell anybody anything:

    15:57:46,451 INFO  [STDOUT] [] DEBUG:
    15:57:46,451 INFO  [STDOUT] getObjectByIdentity org.apache.struts.util.MessageResource{,,de_DE,}
    15:57:46,471 INFO  [STDOUT] [] DEBUG:
    15:57:46,471 INFO  [STDOUT] SQL: SELECT locale,val,msgKey,bundleKey,subApp FROM application_resources WHERE (application_resources.subApp = ? ) AND (application_resources.bundleKey = ? ) AND (application_resources.locale = ? ) AND (application_resources.msgKey = ? )
    15:57:46,651 INFO  [STDOUT] [] DEBUG:
    15:57:46,651 INFO  [STDOUT] getObjectByIdentity org.apache.struts.util.MessageResource{,,,}
    15:57:46,661 INFO  [PropertyMessageResources] Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
    15:57:46,681 INFO  [STDOUT] [] DEBUG:
    15:57:46,681 INFO  [STDOUT] getObjectByIdentity org.apache.struts.util.MessageResource{,,de_DE,prompt.upload_sucess.submenu}
    15:57:46,681 INFO  [STDOUT] [] DEBUG:
    15:57:46,681 INFO  [STDOUT] getObjectByIdentity org.apache.struts.util.MessageResource{,,,prompt.upload_sucess.submenu}

    I don't understand my fault...

    I thank you very Much!