在部署的時候出現Server Tomcat v6.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.
也就是我們限定了部署的時間導致的錯誤,經過在網上的查找,找到了以下的解決方案:
我們找到當前工程的workplace目錄,然后按下面的操作:
找到workspace\.metadata\.plugins\org.eclipse.wst.server.core\servers.xml文件。
<servers>
<server auto-publish-setting="2" auto-publish-time="1" configuration-id="/Servers/Tomcat v6.0 Server at localhost-config" deployDir="wtpwebapps" hostname="localhost" id="Tomcat v6.0 Server at localhost" name="Tomcat v6.0 Server at localhost" runtime-id="Apache Tomcat v6.0" server-type="org.eclipse.jst.server.tomcat.60" server-type-id="org.eclipse.jst.server.tomcat.60" start-timeout="45" stop-timeout="15" testEnvironment="true" timestamp="3"/>
</servers>
把 其中的start-timeout="45" 改為 start-timeout="100" 或者更長,根據不同同學的工程大小來設置。
最后重啟eclipse就可以了。