简体   繁体   中英

Deploying modules in a web application

I have a web application - deployed on Tomcat.

It has two modules Module A and Module B

Both have java code as well as UI component (struts\\JSP etc.)

Functionally, Module A is independent an doesn't depend upon Module B For ModuleA: We create a war for Module A and deploy it as ModuleA.war

Now Module B depends upon Module A We so "merge" the two modules into ModuleB.war This involves merging the web content directories into one

We were feeling uncomfortable with this whole process of merging and wondering if there is a smart way to do this ? We are also considering putting all the web content in one of teh modules - say Module A and just keep the java code in ModuleB

Any suggestions ?

This is one of the java problems. Say you app A is the public website, say your app B is your admin, but uses same database, same bizlogic classes,etc. I found this problem all time. My approach might help you.

module A will have classes related only to project A module B will have classes related only to project B mod A and B will share a .jar file who contains all related classes, you can deploy it in TOMCAT/lib or if you want maintain it individually, deploy it in each app MYAPP/WEB-INF/lib

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM