2017-09-05 230 views
0

我正在Eclipse霓虹燈3和tomcat 7上寫一個簡單的restful APT(tomcat 9也不工作)。但是,在我保存我的java代碼並在服務器上運行我的項目後,Tomcat服務器無法更新。我注意到,只有在服務器重新加載像下面的情況下,它執行的java文件的更新版本:關於Eclipse上的tomcat服務器:如何使tomcat服務器重新加載項目上下文

Sep 04, 2017 8:20:35 PM org.apache.catalina.core.StandardContext reload 
INFO: Reloading Context with name [/messenger] has started 
Sep 04, 2017 8:20:37 PM org.apache.catalina.startup.TldConfig execute 
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. 
Sep 04, 2017 8:20:38 PM org.apache.catalina.core.StandardContext reload 
INFO: Reloading Context with name [/messenger] is completed 

的問題是如何使Tomcat服務器重裝項目環境隨意,這樣我可以重新加載的背景下,只要我想要。

我曾嘗試以下選項,但都失敗了:

1)建設項目+在服務器

2)重啓服務器

3)在調試心情重新啓動服務器上運行。

另外,Context中的tomcat server.xml reloadable屬性爲true爲默認值。

非常感謝!

+0

請參閱https://stackoverflow.com/questions/998737/integrating-tomcat-and-eclipse-as-a-hot-deploy-environment和https://www.mulesoft.com/tcat/tomcat-reload –

回答

0

檢查您的eclipse屬性。轉到您的項目屬性 - >檢查部署程序集和Java構建路徑。