Tomcat 服务器的端口号的修改

在系统中找到Tomcat安装目录下的conf文件夹下的servlet.xml文件。

(1)在servlet.xml文件中找到以下代码:

<connector port="8080" protocol="HTTP/1.1" 

                 connectionTimeout="20000"

                 redirectPort="8443" /> 

(2)将上面代码中的port="8080"修改为port="8081",即可将Tomcat的默认端口设置为8081。

       在修改端口时,应避免与公用端口冲突。建议采用默认的8080端口,不要修改,除非8080端口被其他程序所占用。

(3)修改成功后,为了使新设置的端口生效,还需要重新启动Tomcat服务器。

posted @ 2015-07-23 19:06  Tcool  阅读(423)  评论(0编辑  收藏  举报