Search code examples
tomcatuser-interfacereusability

UI component re-usability


how it is possible to package/share a UI component in more than one WAR, having only one version of the code?

Example: -We develop one searchUser (IU & Controller) component. -We use it webApp1 and webApp2 -If we need to make some changes in searchUser (IU & Controller), we dont need to make changes in two places, we only need to re-package webApp1 and webApp2.

Thanks

Update: Thanks to Chad Howto re-use War resources between Wars with Maven War Plugin


Solution

  • stuff it in its own jar and redistribute in every war, no?

    Options:

    • if you already use maven, use it
    • there are other options like maven (gradle and the like)
    • put the jar in a central folder and implement the fetching in a prebuild step or your build script