简体   繁体   中英

Deploying in Tomcat from eclipse

I am using Maven, Eclipse and Tomcat to develop a web application which consists of different modules. When I build the project using Maven I am getting a war file for each module. My question is how to deploy that generated modules into Tomcat server from Eclipse.

take this war file to webapps directory in tomcat, simply you can rename the file name to Root.war and run the tomcat

reference

As your are saying that you have different modules there, those will be named like XXXDAO, XXXcommon etc,

Option-1: simply try right click on each module and you will see the option

right click on prject --> Run As --> Run on Server

Among all the module only one module will show this option that is your actual war that will use all other war files

Option-2: if you know about that module then just put that war and put it in web apps folder in tom cat and start tomcat.

if not help you then please show the project and directory structure of your projects.

Note: Your application's Pom.xml will help/guid you a lot. try using that

A good way to do it with just Maven is to use the cargo-maven-plugin . This also makes deployment container-agnostic, and provides several other benefits.

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