1. 程式人生 > >tomcat 錯誤:Access Error: 404 -- Not Found Cannot locate document: /

tomcat 錯誤:Access Error: 404 -- Not Found Cannot locate document: /

原因是8080埠被佔用(可能是其他軟體,比如NI公司軟體,電子專業童鞋一般都裝有這類軟體)

解決方法1:

When I had an error Access Error: 404 -- Not Found I fixed it by doing the following:

Open command prompt and type "netstat -aon" (without the quotes) Search for port 8080 and look at its PID number/code. Open Task Manager (CTRL+ALT+DELETE), go to Services tab, and find the service with the exact PID number. Then right click it and stop the process.

由於我沒有在netstat -aon中找到8080 port,所以選擇方法2:

解決方法2:

記事本開啟tomcat安裝檔案的conf中server.xml,將

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />

中的8080改為8081,儲存,重新啟動bin目錄下shutdown 然後statup,在位址列輸入http://localhost:8081/