aspose file tools*
The moose likes Struts and the fly likes Mutiple brand support with one web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Mutiple brand support with one web application" Watch "Mutiple brand support with one web application" New topic
Author

Mutiple brand support with one web application

amitesh kumar
Ranch Hand

Joined: Aug 01, 2006
Posts: 50
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
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8964
    
    9

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.


[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mutiple brand support with one web application