How to set the default port (text) for Tomcat _tomcat

Source: Internet
Author: User
Tags tomcat

The default port for Tomcat setup is 8080, and the default port for the HTTP protocol is 80, so the URL to test for Tomcat is "http://localhost:8080", and if you set the Tomcat port to 80, enter "http ://localhost "To display the Tomcat default home page, as shown in the following illustration:

Jdk,tomcat (This paper takes Tomcat7.0.27 as an example);

Method/Step

1, the successful installation of JDK and Tomcat (if this step is problematic, you can view my relevant experience!) );

2. Locate to Tomcat installation directory: Right-click Tomcat, select Properties, click Open File Location:

3, under the directory "tomcat7.0\conf" find "server.xml" file, with VS or other can interpret the XML file Tools open:

4, find the code port= "8080", the 8080 modified to 80, click "Save" to complete the modification:

5, after the completion of the changes need to restart the server: first click the Stop Stop server, and then click Start to open the server:

6. Open the browser after restarting the server, enter "http://localhost" in the Address bar and press ENTER to display the following:

Attention:

You can also open the. xml file with Notepad, but the display could not use color to distinguish between code and comments, looks very messy, not easy to find 8080;

URL input can generally omit the "http://", and localhost can also be replaced by "127.0.0.1";

For more information click on my username in the upper right corner of the page to view and get relevant experience in real time click the "Attention" button below the username and feel the article is good please "share".

-->

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.