Create web projects and deploy related operations in idea, myeclipse

Version: idea version 2020.3, jdk1.8, maven 3.6.3

 

  • Create web project

  • Choose java Enterprise

Server configuration can be set here

  • Select the corresponding server software, specify the directory

  • Select project build tool test tool

  • Click next

  • Project name related settings

  • Set operating parameters

  • The packaging option of packaging project maven, the compiled war package is in the target folder

PS: If you want to view the java or .class file compiled by the jsp file. Idea's web project is not directly placed in the tomcat container (that is, not in the webapps folder under the tomcat directory), but the generated web project and tomcat are connected according to the "technology" of the idea, which reduces a lot The time to configure tomcat, configure once, once and for all. After searching in the following folder

C:\Users\用户名\AppData\Local\JetBrains\IntelliJIdea2020.3\tomcat\7fbf60d3-f8c8-468f-a3a2-c0196e7c9d74\work\Catalina\localhost\demo_war_1\org\apache\jsp

Version: MyEclipse2018, jdk1.8, maven 3.6.3

  • New Project

  • The built project lacks web.xml file, right click on the project and select Generate Deployment in JavaEE Tools

  • Service configuration, you can right-click under sever to select new sever, and select the version corresponding to the local tomcat

  • Deployment project, and related configuration

Add or remove items

Tomcat settings, double-click the created server, you can select the project deployment location and other related configurations on the pop-up page

  • Project deployment name setting, search web in properties can be set, slightly different from eclipse

run

PS: View the java or .class file compiled by jsp under the corresponding project name directory in the work folder of the tomcat container

D:\apache-tomcat-9.0.41\work\Catalina\localhost\Test\org\apache\jsp

Advice: Don't be too impatient to learn techniques, lay a solid foundation step by step, review often, and practice more.

 

Guess you like

Origin blog.csdn.net/qq_39655510/article/details/111037671