How to modify the default port (8080) to 80 port for Tomcat

Source: Internet
Author: User

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

It is simpler to implement such access methods.

1, open Tomcat under the Conf folder in the Server.xml file

2, find

<port= "8080"
Maxthreads= "150"
Minsparethreads= "25"
maxsparethreads= "75"
Enablelookups= "false"
Redirectport= "8443"
acceptcount= "100"
debug= "0"
connectiontimeout= "20000"
Disableuploadtimeout= "true"
/>

Amended to
<port= "80"
Maxthreads= "150"
Minsparethreads= "25"
maxsparethreads= "75"
Enablelookups= "false"
Redirectport= "8443"
acceptcount= "100"
debug= "0"
connectiontimeout= "20000"
Disableuploadtimeout= "true"
/>

3. Restart Tomcat

4, in the address bar input http://localhost/index.jsp will be able to enter the Tomcat home

5, if in the access process found that the server did cache, do not refresh the page, you can use a filter, forcing the page does not cache. Just in a

    filters (usually in coded filters) include the following statement:
          Response.setheader ("Cache-control", "No-store");  
          Response.setheader ("Pragma", "No-cache");  
      &N Bsp   Response.setdateheader ("Expires", 0);    
 
 6, if the parameters are passed through JS generated (word) garbled, it needs encodeURI () encodes the parameters.
 

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.