Database is the simplest solution. Site column is the site identifier and the platform selects resources based on this column. Files, text, settings, templates can be uploaded to a database. Ideally, all resources should be stored in the database.
Since JSP cannot be stored in the database (as those must be bundled in WAR package), the platform supports other mechanism to assign the site identifier to JSP. Site-able JSP have pure site key (letters without digits) appended to file names (eg. home-mh.jsp will load for holiday-estates.eu website instead of home.jsp). The platform operating on a chain checks if site-able JSP exists and then forwards to it. JSP site is pure because it does not need optional category as it merely a template as all the text and graphics should be loaded from the database. This solution is implemented by using tag libraries.
Site-able JSP increase the amount of files in the project which makes it harder to maintain and develop. But there is no alternative if a website has to provide unique layouts by using just JSP pages. For example, home page may be overwritten for every website. Since the amount of domains supported by the platform is unlimited the priority is to store in the database as much as possible while minimizing the count of site-able JSP.
However, the better solution is to use Freemarker templates instead of JSP. Such templates are just plain files which can easily be stored in the database thus eliminating piles of site-able JSP pages.