Use Eclipse to publish a Web project and deploy it on the Tomcat server, and use javassetomcat
Use Eclipse to publish a Web project and deploy it on the Tomcat server:
1. Create two Java Web projects: JavaWeb_TestRelease01 JavaWeb_TestRelease02, and create two index. jsp pages in the project. The body content is:
Wecome to aaa.com home page, Wecome to bbb.com home page
2. Use Eclipse to Export the two projects as. war files, select the projects respectively, right-click, and select Export...> select Web WAR file> select Export address> Finish
3. Start Tomcat after installation. Open the browser and enter http: // localhost: 8080/To Go To The Apacge Tomcat homepage. Click the Manager App on the right to enter the username and password.
4. Click WAR file to deploy to upload the project. war file you just used to package and export using elasticsearch.
5. Check after uploading: there are two more items in the list: click the link on the left to access: normal access is found.
However, the website is usually accessed directly through the domain name binding port. You need to point to the folder to access it normally. We open the Tomcat installation address and install it on: c: \ Program Files \ Apache Software Foundation \ Tomcat 9.0. the following Files are displayed in webapps:
Open the server. xml file in conf:
View server. xml node (note that the comments mentioned here have been deleted by me): the following mark indicates that the domain name is bound to the localhost. The access port corresponding to the localhost is 8080, And the folder address pointed to is webapps, therefore, you can enter http: // localhost: 8080/JavaWeb_TestRelease01/and http: // localhost: 8080/JavaWeb_TestRelease02/in the browser to access the service normally.
At the end of the next section, configure server. xml to directly access the publishing website through the domain name port, without the project file name/JavaWeb_TestRelease01