This blog will show how you can deploy your apps on tomcat using eclipse having grunt/gulp build for UI elements.
So what we will be actually doing here is 1. Deploy the UI components on default Tomcat webapp directory. 2. Deploy the class files on "wtpwebapps" (default directory for uploading war through eclipse) directory. So that the UI components not replaced by src/main/webapp contents on each tomcat deployment.
- Go to server tab, open properties for tomcat
- Make sure, the location should be [workspace metadata]
- Then double click on tomcat to open Tomcat overview.
- Set server location to "Use tomcat location".
- Use the copy task to copy the build UI file to
<tomcat installation directory>/webapps/<contextRoot>/
This can help in replacing the code on tomcat server without actually restarting the server.
- Open Tomcat overview by clicking on "tomcat" under server tab.
- Under publishing, Select "Automatically publish changes"
- Now go to modules tab, Edit your web module and Unchech auto reload.
NOTE This will work in DEBUG mode only.