Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Resolve the problem of Idea importing Web project and publishing to Tomcat

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Idea imported an existing Web project and published it to Tomcat, and found Tomcat was not automatically published

Question:

When importing a Web project, idea does not treat it as web, so you need to modify the project structure yourself.

1. import project

Open File->Open...

2. Found items web front icon without dots

The correct answer is this:

3. configured to run

(1). Configure the operating environment

Open Run->Edit Configurations...

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

(3). Select Local Tomcat, find directory

(4). Select Deployment Nothing, find a red exclamation mark below (think things are not so simple), select Add

(5). Select Build Artifacts

Emmm... I can't add the currently imported item.

Tomcat can only be added first (not yet operational)

Solution:

Open Project Structure... (Project structure...), Ctrl+Alt+Shift+S

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

2. Select Modlues and find this module exists, but we're going to remove it now

pop-up warning, roughly saying: Remove project unique module, will not be deleted on hard disk

3. re-import

from the paper

Create a new resource module, then all the way to next

4. Click to finish and find that the small icon in front of the web has a small dot, which means Idea regards it as a web project.

5. Continue opening Project Structure..., Select Faces and you will see the project name

if no

Add one if you have one.

6. Select Artifacts Add Module

7. Go back to configuration run, select Tomcat created earlier, click "+" below

(Only later did I find out that you don't need to add it here. If you add Artifacts after directly selecting Deployment, it will automatically be added here)

Build Artifacts

after the addition was complete

Select Deployment->+->Artifact...

after the addition was complete

8. Start Tom Cat!!!

Error...

Click OK to jump to Project Structure(if there is no need to open it yourself), find that Project Compiler output is empty, create a new out folder under the project, and specify this folder

Start again!!

No dependency found...

After adding, start... Normal...

At this point, the problem was solved.

summary

The above is a small series to introduce you to solve the problem of importing Web projects and publishing ideas to Tomcat, I hope to help you, if you have any questions please give me a message, small series will reply to you in time. Thank you very much for your support!

If you think this article is helpful to you, welcome to reprint, please indicate the source, thank you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report