How to put an external resource bundle file on the classpath inStruts?

Discussion in 'Java' started by giovanni.suter@gmail.com, Aug 6, 2008.

  1. Guest

    Hi all,
    I use usually for internationalization the resource bundle properties
    and use the <bean:message> Struts tag for the different Locales.
    Normally this is internal to the web application (everything resides
    within the *.ear file).
    However, because of a change in the business requirement, I have to
    externalize all *.properties file - they cannot be part of the web
    application, but must be located in an external location (on a
    Solaris
    machine).

    Since all my JSPs uses <bean:message> I should find a solution for
    the
    problem that the Struts framework will no longer find the
    *.properties
    files under the WEB-INF/classes directory.


    Since I want to keep the JSPs as they are, I thought maybe there is a
    way to load all the *.properties files on the classpath, when the
    application starts:


    let's say all properties are located in


    /etc/apps/i18n


    Now: I have a single file that initializes all kind of application
    specific variables. One of these variables could be the key that maps
    the directory of all *.properties. And now my trouble begins: I don't
    know how, and if it is possible to load the value of that key and put
    the files on the web application classpath, so that Struts can use
    its
    internationalization mechanism.


    Does anybody has a tip or hint how to do this? Maybe with a piece of
    code please....

    I must use Struts1.1, Websphere 6.1, JDK 1.5

    Thank you very much for your answers,
    John
     
    , Aug 6, 2008
    #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. Kent Tong

    i18n using resource bundle

    Kent Tong, Jul 15, 2003, in forum: Java
    Replies:
    2
    Views:
    904
    Kent Tong
    Jul 16, 2003
  2. Mike Landis

    Reloading resource bundle

    Mike Landis, Oct 22, 2003, in forum: Java
    Replies:
    0
    Views:
    452
    Mike Landis
    Oct 22, 2003
  3. Replies:
    4
    Views:
    377
  4. John
    Replies:
    2
    Views:
    1,168
  5. Amit Jain
    Replies:
    0
    Views:
    318
    Amit Jain
    May 19, 2009
Loading...

Share This Page