Home > Java > javaTutorial > Solution to the problem that tomcat5.5 cannot be accessed through IP and 127.0.0.1 under win7

Solution to the problem that tomcat5.5 cannot be accessed through IP and 127.0.0.1 under win7

怪我咯
Release: 2017-06-26 11:20:11
Original
1809 people have browsed it

Solution: Find the conf\server.xml file in the tomcat5.5 directory. The original text is as follows:

<Connector port="8080" maxHttpHeaderSize="8192"  
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"  
               enableLookups="false" redirectPort="8443" acceptCount="100"  
               connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"
Copy after login

Add address="0.0.0.0" , modified as follows:

 <Connector port="8080" maxHttpHeaderSize="8192"  
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"  
               enableLookups="false" redirectPort="8443" acceptCount="100"  
               connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"
Copy after login

The root cause of this problem is that when tomcat5.5 is started, if it is detected that the system supports IPV6, then the default listening address is the IPV6 address The port is inaccessible through IPV4.
Using address="0.0.0.0" means to monitor any IP address under the IPV4 protocol stack.
IPV4 protocol should be configured to monitor any address at 0.0.0.0
IPV6 protocol should be configured to monitor any address at 0:0:0:0:0:0:0:0
According to the investigation, this problem no longer exists after tomcat6 Yes, the default listening port is the IPV4 address.

The above is the detailed content of Solution to the problem that tomcat5.5 cannot be accessed through IP and 127.0.0.1 under win7. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template