Tomcat and Eclipse Zero Turnaround Deployment

后端 未结 3 956
情深已故
情深已故 2020-12-14 03:22

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 classe

3条回答
  •  遥遥无期
    2020-12-14 03:59

    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:

    
    
    

提交回复
热议问题