Solve the problem of importing idea into web project and publishing it to Tomcat


Idea imports an existing web project and publishes it to Tomcat. It is found that Tomcat does not publish automatically


When importing a web project, idea does not regard it as web, so it needs to modify the project structure by itself

1. Import project

Open file > Open

2. It is found that the icon in front of the project web does not have a dot

The correct way is as follows:

3. Configuration and operation

(1) . configure the running environment

Open run > Edit configurations


(2) . click the small plus sign in the upper left corner

(3) . select local Tomcat and find the directory

(4) . select deployment and find that there is a red exclamation mark below it. Select Add

(5) . select build artifacts

Emmm… Can’t add the current imported project

You can only add Tomcat first (it can’t run yet)


1. Open project structure… Or use the shortcut key: Ctrl + Alt + Shift + s


Found no SDK, added quietly (but not this problem)

2. Select modlues and find that this module exists, but we need to remove it now


Pop up warning, roughly means: remove the only module of the project, will not be deleted on the hard disk

3. Re import

From deposit

Create a new module in the resource of, and then go all the way to next


4. When you click finish, you will find a dot on the small icon in front of the web, which means idea regards it as a web project

5. Continue to open project structure… And select faces to see the project name

If not

Add one if you have one

6. Select arts to add a module

7. Go back to the configuration run, select the Tomcat created before, and click “+” below

(after that, I found that you don’t need to add it here. If you directly select deployment and add arts, it will be added here automatically.)


Build Artifacts

After adding


Select deployment – > + – > artifact

After adding

8. Start tom cat!!!

report errors…


Click OK to jump to project structure (if you don’t need to open it yourself). You will find that project compiler output is empty. Create a new out folder under the project and specify this folder

Start again!!!

No dependencies found

After adding, start… Normal


So far, the problem has been solved.


The above is Xiaobian’s introduction to solve the problem of importing idea into web project and publishing it to Tomcat. I hope it can help you. If you have any questions, please leave me a message and Xiaobian will reply you in time. Thank you very much for your support to developer!
If you think this article is helpful to you, please reprint, please indicate the source, thank you!