How to deploy one webapp with several web modules that can be removed or added separately

We are currently running two separate webapps (WARs) deployed in one single EAR containing additional JARs and parameters. To improve our deployment, I want to break one of these webapps into various modules that can be built and packaged individually . But at the moment I donโ€™t know how to pack these modules so that I can add or remove them as I like - at best, at runtime.

Webapp is becoming more complex, and I would like to separate some functions from modules. These modules should be packaged as separate archives. So far, they only contain classes and resources loaded through code, I know how to do it (simple JARs). But what about JSP? Typically, a WAR file contains JSP or HTML files. In my case, these are JSF pages using JBoss Seam and RichFaces .

These modules will add JSF classes , resources and pages , and others to the running web application. Is it possible to somehow deploy them as separate archives to serve the same running webapp?

We use Maven for our assembly and packaging and deployment in JBoss v4 .

+5
source share
1 answer

An easy way to do this is to include the JSPs of different modules in different folders, and the JSPs that are commonly used in all modules can be stored in the root.

Now, if you want to unload the module, delete the corresponding folder.

Hope this helps.

+1
source

All Articles