Where is the project location deployed by IntelliJ IDEA using Tomcat?

Where is the project location deployed by IntelliJ IDEA using Tomcat?

After IntelliJ IDEA deploys a Javaweb project using Tomcat, the project cannot be found in the webapps directory of Tomcat.

1. First look at the directory of webapps after deploying the project

Write the picture description here
Write the picture description here

2. First, explain how to find the deployed projects, and then explain the reasons.
2.1 First click on the project, right click on Show in Explorer.

Write the picture description here

2.2
The project here does not use Maven, so the output directory is out. If it is Maven, it is in the target directory. It may also be a problem with the idea version, so the names are different, but they all belong to the output directory. 18 years of article...

Write the picture description here

2.3

Write the picture description here
2.4 Write the picture description here

At this point the deployed web project has been found.

3. After IntelliJ IDEA deploys a project using Tomcat, it will not copy the compiled project to the webapps directory of Tomcat, but it will tell Tomcat the path of the compiled project so that Tomcat can find the project. Other projects such as Tomcat's homepage project ROOT cannot be opened because IntelliJ IDEA only lets Tomcat run one project.
Next, let's take a look at the directory structure of the war package, which is the directory structure of the entire web project after compilation.

Write the picture description here
Write the picture description here

4.Tomcat has 4 deployment methods, and the deployment method of eclipse is different from that of IntelliJ idea.

The tomcat deployment methods are:
(1) Use Tomcat to automatically deploy the project and put it in the webapps directory. Start Tomcat and it will automatically deploy.

(2) Use the console for deployment. The console does not refer to cmd, but to the root page entered after Tomcat is started. There is a manager to manage the deployment project.
Enter the deploy area of ​​the tomcat manager console to set it up and you can deploy it

The above two methods are used by myself. Usually, others send packages to me, and then throw them in, start tomcat and deploy them, but the development tools do not use the above two methods.

platform-zwml-admin is the name of my project

The following is used in IntelliJ idea (3) to add a custom web deployment file (%Tomcat_Home%\conf\Catalina\localhost\platform-zwml-admin.xml)

insert image description here

The following methods are all used in Eclipse (4) Modify the %Tomcat_Home%\conf\server.xml file to deploy the web application

insert image description here

Therefore, web projects do not have to be placed in the webapps folder to be deployed, they can also be deployed in other locations.
Eclipse is placed in the .metadata folder of the workspace by default, which can be modified to other places, usually configured in the webapps folder.
The idea is configured to the out folder, which is the output directory.

This is the end of this article about where the project location of IntelliJ IDEA is deployed using Tomcat. For more information about how to deploy a project using Tomcat, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • How to modify the path of cache files in IntelliJ Idea2017
  • Configuration of Maven local warehouse and modification of default .m2 warehouse location
  • Detailed tutorial on how to quickly configure IntelliJ IDEA
  • How to modify the storage location of configuration files in IDEA

<<:  HTML+CSS to achieve drop-down menu

>>:  JavaScript static scope and dynamic scope explained with examples

Recommend

Example analysis of the impact of MySQL index on sorting

This article uses examples to illustrate the impa...

A detailed introduction to seata docker high availability deployment

Version 1.4.2 Official Documentation dockerhub st...

Use dockercompose to build springboot-mysql-nginx application

In the previous article, we used Docker to build ...

How to restore docker container data

The project test environment database data is los...

Detailed explanation of docker nginx container startup and mounting to local

First, the structure inside the nginx container: ...

How to use js to determine whether a file is utf-8 encoded

Conventional solution Use FileReader to read the ...

MySQL Server IO 100% Analysis and Optimization Solution

Preface During the stress test, if the most direc...

How to use Linux to calculate the disk space occupied by timed files

Open the scheduled task editor. Cent uses vim to ...

How to use mixins in Vue

Table of contents Preface How to use Summarize Pr...

Solution to MySQL garbled code problem under Linux

The project interacts with the server, accesses t...