I want to be able to deploy code changes to Tomcat (near instantly), while I'm developing in Eclipse.
So far, I have my output from Eclipse placing the built classes in the
Set to true if you want Catalina to
monitor classes in /WEB-INF/classes/
and /WEB-INF/lib for changes, and
automatically reload the web
application if a change is detected.
For these cases I set the eclipse build output to WEB-INF/classes as you have done and create a context file with the docBase set to the webapp folder (parent of WEB-INF) in the project. This is manually placed in conf/Catalina/localhost (assuming default configs for some elements of server.xml). End result is tomcat ends up serving from the development directory. So, change a servlet or other class and it is updated to the classes folder. Save a jsp and it is immediately available.
If project structured like:
src |-main |-webapp |-images |-js |-WEB-INF |-jsp |-classes
Then context would be like:
<?xml version="1.0" encoding="UTF-8"?> <Context path="/path" reloadable="true" docBase="<pathtoproject>/src/main/webapp" />