different WAR files, shared resources

后端 未结 6 1597
醉话见心
醉话见心 2021-01-02 13:36

Suppose you have several applications which share the same code and most of the other resources, but have a somewhat different look and feel, some labels change, etc. (thin

6条回答
  •  不知归路
    2021-01-02 14:36

    Update

    Yes, me again. I have actually changed my mind (again :) ). I am currently trying (being more prudent here):

    • (Common)WAR: containing the application, common (most part) + some specific stuff
    • EAR1: CommonWAR + specific configuration file for env1
    • EAR2: CommonWAR + specific configuration file for env2

    The configuration file is picked up by the WAR. It is on the the EAR classpath and only contains one property 'application' with a value. The single WAR will then use this information where appropriate to distinguish between the two apps (config, style sheets, ...).

    With my solution of EAR1 = CommonWAR + WAR1, EAR2 = CommonWAR + WAR2, it was too difficult or impossible to lookup static resources in the CommonWAR without using a web url (e.g. images in PDF documents generated with iText).

提交回复
热议问题