• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Mutiple brand support with one web application

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my current project the requirement is that the same web application should support multiple brands. Each brand will have its unique domain name. E.g. brand-a.com,brand-b.com etc. There is only one web application instance which supports all the brands. In order to do this it was decided that there will be one resource bundle per brand & I18n version of resource bundles will exist for each brand.

Example:

Brand-A has Messages_brandA.properties, Messages_brandA_en.properties, Messages_brandA_fr.properties, Messages_brandA.properties_es etc.
Brand-B has Messages_brandB.properties, Messages_brandB_en.properties, Messages_brandB_fr.properties, Messages_brandB.properties_es etc.

The system also has one default brand. and corresponding resource bundles.

We are using different APIs like displaytag jar, velocity API etc.

Please provide me with some concrete information with which I can go ahead with approach.

I NEED A SOLUTION ASAP.

Thanks in ADVANCE

Amitesh
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

amitesh kumar wrote:
I NEED A SOLUTION ASAP.



First off, Ease Up. We're all volunteers who answer questions in our spare time.
Second, the web site I maintain has similar functionality: See here and then here and then here. We didn't use resource bundles. We have an XML-based approach. We have a configuration file like this (this snippet shows the configuration for the logo on the left-hand side of the page, note the "default" value with no qualifier):


When the application is loaded, these XML files are loaded into a map (by key) of maps (by qualifier). We then have several classes to access these values in code and on JSP pages. Specify the key and qualifier and get whatever value is in the XML. It's very flexible in practice.
I've much simpler configurations with property files, where each property had an additional value indicating the environment (see here). nothing as convoluted as the above.
I honestly don't know if it is possible to do what you want with plain message bundles. It's always a good idea to test the feasibility of a design before committing to it.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic