How to deploy a single webapp with multiple web-modules that may be removed or added individually
We currently run two separate webapps (WARs) deployed in one single EAR containing additional JARs and settings. To improve our deployment I want 开发者_JAVA百科to split one of these webapps into different modules that may be build and packaged individually. But I've currently no clue on how to package these modules so that I'm able to add or remove them as desired - at best during runtime.
The webapp is getting more and more complex and I'd like to separate some of the functionality into modules. These modules should be packaged as single archives. As long as they contain only classes and resources loaded through code I know how to do this (simple JARs). But how about JSPs? Normally a WAR file contains JSPs or HTML files. I my case it are JSF pages utilizing JBoss Seam and RichFaces.
These modules will add classes, resources and JSF pages and other includes to the running webapplication. Is it somehow possible to deploy them as individual archives to serve the same running webapp?
We are using Maven for our build and packaging and deploy into JBoss v4.
Simple way of doing it is to put the JSPs of different modules in different folders and the JSPs which are used commonly in all modules can be kept in the root.
Now if you want to unload a module, remove the corresponding folder.
Hope this helps.
精彩评论