How to modify Tomcat's default port (8080) to port 80

Source: Internet
Author: User

How to use the default port 80 to log on to Tomcat's http: // localhost/index. jsp page

This method is relatively simple.
 
1. Open the server. xml file in the conf folder under tomcat.
 
2. Find
 
<Port = "8080"
Maxthreads = "150"
Minsparethreads = "25"
Maxsparethreads = "75"
Enablelookups = "false"
Redirectport = "8443"
Acceptcount = "100"
DEBUG = "0"
Connectiontimeout = "20000"
Disableuploadtimeout = "true"
/>
 
Change
<Port = "80"
Maxthreads = "150"
Minsparethreads = "25"
Maxsparethreads = "75"
Enablelookups = "false"
Redirectport = "8443"
Acceptcount = "100"
DEBUG = "0"
Connectiontimeout = "20000"
Disableuploadtimeout = "true"
/>
 
3. Restart Tomcat
 
4. Enter http: // localhost/index. jsp in the address bar to go To the Tomcat homepage.

5. If the server is found to be cached during access without refreshing the page, you can use a filter to force the page to be cached. Only one

Filter (usually in the encoding filter) Add the following statement:
Response. setheader ("cache-control", "No-store ");
Response. setheader ("Pragma", "No-Cache ");
Response. setdateheader ("expires", 0 );
 
6. If garbled characters (single words) are generated when passing parameters through JS, You need to encode the Parameters Using encodeuri.

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/crazy_rain/archive/2007/05/29/1628965.aspx

 

From: http://blog.csdn.net/crazy_rain/archive/2007/05/29/1628965.aspx

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.