Idea imports an existing web project and publishes it to Tomcat, but finds that Tomcat does not publish automatically question: When importing a web project, idea does not treat it as a web, so you need to modify the project structure yourself 1. Import the project Open File->Open... 2. Found that the icon in front of the project web does not have a small dot
3. Configure and run (1) Configure the operating 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) When you select Deployment, there is nothing. You will see a red exclamation mark below (thinking things are not that simple). Select Add. (5) Select Build Artifacts Emmm... Sure enough, I can't add the currently imported project You can only add Tomcat first (it can't run yet) Solution: 1. Open Project Structure..., or use the shortcut key: Ctrl+Alt+Shift+S Found that there is no SDK, quietly added it (but this is not the problem) 2. Select Modlues and find that this module exists, but we want to remove it now A warning pops up, which roughly means: Remove the only module of the project, it will not be deleted on the hard disk 3. Re-import
Create a new module in the resources, and then follow the next 4. After clicking Finish, you will find that the small icon in front of the web has a small dot, which means that Idea treats it as a web project 5. Continue to open Project Structure..., select Facets, and you will see the project name
If yes, add one 6. Select Artifacts to add the module 7. Continue back to the configuration run, select the Tomcat created previously, and click the "+" below (I later realized that I didn’t need to add it here. Just select Deployment and add Artifects, and it will be automatically added here.) After adding Select Deployment->+->Artifact... After adding 8. Start Tom Cat! ! ! Report an error... After clicking OK, you will jump to Project Structure (if not, you need to open it yourself), and find that Project Compiler output is empty. Create a new out folder under the project and specify this folder Start again! ! ! Dependency not found... After adding, start...normal... At this point, the problem is solved. Summarize The above is what I introduced to you about solving the problem of importing Web projects into Idea and publishing them to Tomcat. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: MySQL 8.0.12 installation and environment variable configuration tutorial under win10
>>: Vue-Element-Admin integrates its own interface to realize login jump
Table of contents 1. Object properties 1.1 Attrib...
Effect Fading from top to bottom Source code html...
by Take the effect shown in the picture as an exa...
MySQL version: MySQL Community Edition (GPL) ----...
Table of contents 1. The role of index 2. Creatin...
Preface When using the MySQL database, sometimes ...
Implementation of navigation bar, fixed top navig...
How PHP works First, let's understand the rel...
margin:auto; + position: absolute; up, down, left...
After nginx is compiled and installed and used fo...
Due to hardware reasons, the machines may not kee...
This article example shares the specific code of ...
Table of contents Kill instruction execution prin...
Preface The requirement implemented in this artic...
Table of contents 1. Function definition 1.1 Func...