Search code examples
javaeclipsetomcattomcat8spring-tool-suite

Automatically publish application in eclipse without keeping eclipse window active


I am facing a weird problem.

I have a requirement in which I have to deploy application on tomcat of eclipse whereas do coding in Visual Studio Code.

I have deployed an application on tomcat of eclipse and have enabled "Automatically publish when resources change".

Application gets published whenever I change any file from eclipse.

But when I change the same file from Visual Studio code, the it does not get auto-published.

But when I open(or keep active) the eclipse window, changes get auto-published.

Is there any way to which will allow me to code in Visual Studio Code and auto-publish that application on tomcat of eclipse.

Note: The application must be deployed on tomcat of eclipse only. It should not be deployed externally.


Solution

  • Open the preferences via "Window >> Preferences" then type "refresh" in the searchbox and you will find the preferences under "General >> workspace". Make sure to enable "Refresh using native hooks or polling" and "Refresh on access" (maybe enabling one of them is enough but I always enable both to make sure).

    enter image description here