idea, deploy tomcat under eclipse

Step 1: File->New Project, create a common project

Step 2:
Create a Module
mouse click on the project name demos -> right click and select New, select Module, check "Web Application" -> confirm that "Create web.xml" is checked -> Finish

Step 3: Create classes and lib files (classes are used to store the compiled class files, and lib is used to store third-party jar packages.)
Insert picture description here
Step 4:

Configure folder path
File -> Project Structure (shortcut key: Ctrl + Shift + Alt + S) -> select Module:
select Paths -> select "Use module compile output path" -> select both Output path and Test output path just now The classes folder created.
Insert picture description here
Step 5: Then select Dependencies -> select Module SDK as 1.7 -> click the "+" sign on the right -> select 1 "Jars or Directories" -> select the lib folder just created ->
select "jar directory" -> Then go back all the way to OK~~

Step 6:

Configure the Tomcat container
Open the menu Run -> select Edit Configuration—>
click the "+" sign -> select "Tomcat Server" -> select "Local"
Insert picture description here

Step 7: Enter the new service name in the "Name" field, click "Configure..." behind "Application server", the Tomcat Server window will pop up, select the locally installed Tomcat directory -> OK

Step 8: In the "Server" palette of the "Run/Debug Configurations" window, uncheck "After launch", set "HTTP port" and "JMX port" (the default value is fine), click Apply -> OK, So far the Tomcat configuration is complete.
Insert picture description here
Step 9:

Deploy and run the project in Tomcat
Run -> Edit Configurations, enter the "Run/Debug Configurations" window -> select the Tomcat container just created -> select Deployment -> click the "+" sign on the right -> select Artifact

Step 10: ->Select the web project -> Application context can fill in "/hello" or fill in your project name (in fact, you don't need to fill in) -> OK to
Insert picture description here
run tomcat-1, the browser enters the URL and displays the information successfully!
Insert picture description here

eclipse deploy tomcat

eclipse deployment is relatively simple, the following two blogs can be deployed successfully by following the operation
https://blog.csdn.net/write6/article/details/79137961
https://blog.csdn.net/zs20082012/article/details /79138204 (This article is more detailed, but try not to use the default jre when choosing tomcat, choose your own jre in the step below)
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_43722571/article/details/100941132