新手在刚开始使用eclipse写jsp时,可能会遇到Tomcat服务器打不开的情况,出现了如下的报错:
Several ports (8005, 8080, 8009) required by Tomcat v7.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).
原因:端口被占用了。
分析:eclipse在打开Tomcat时把eclipse关闭了,或者eclipse异常关闭都会造成Tomcat依旧占据端口号的情况,而eclipse却显示Stopped无法Start的困境。
解决方法:把Tomcat给关闭,找到并打开本地Tomcat服务器根目录下的bin文件夹,运行shutdown.bat程序。
回到eclipse就可以重新启动Tomcat了。