Multi-client webapp design

I have a web application in Java, Spring, Struts 2 and Hibernate that serves multiple clients. Each client with multiple users. To create an individual approach to each client, I would like to customize the header for each client. I use sitemesh as a decorator, and I'm looking for tips or examples, or someone who can point me in the right direction on how to do this in best practice.

What do you think? Should I just encode it directly in header.jsp? Extracting information about a registered user and from what creates a custom header by code? Or is there a smarter solution?

Thank!

Update:

To clarify what I want: Various file properties for each client are not an option. We consider potentially hundreds of customers. It must be database based. But this is the easy part. There is no problem storing information in db and retrieving it if necessary.

What I'm trying to understand is some standard way of doing this. What kind of filter or action that is performed in front of the sitemesh decorator that will provide the decorator with the correct information?

+3
source share
2 answers

Struts2 provides an application scope for variables that are global to the application.

#application ( spring, , ). : #application.greeting , . , , , - . , , - .

. , -, . , . , XML, , , , , , , ... , , sitemesh. , , , , JS, , ( - JS- JS ).

Asside 2. , ​​ freemarker , . , , .

+1

Sitemesh , URL-, , URL- - URL-, , Sitemesh .

;

1) , Sitemesh, , , "& clientId =" xx " .

2) Sitemesh , Sitemesh, , , . , , .

3) jsp OGNL , . , () CSS CSS.

, .

0

All Articles