Eclipse + Tomcat - Serve webapp directly from workspace

后端 未结 9 685
旧时难觅i
旧时难觅i 2021-02-04 10:13

What is the ideal way to configure Tomcat to serve directly from my project\'s directory inside of my workspace? (related)

I want my static web resources

9条回答
  •  南方客
    南方客 (楼主)
    2021-02-04 11:08

    It's unclear if you are using the Eclipse WTP approach with Tomcat or some custom deployment strategy.

    I switched away from running Tomcat in Eclipse because of unreliable re-publishing of changed JARs. I'm now using Jetty via the Run Jetty Run Eclipse plug-in (available in the Eclipse Marketplace). This appears to run from the workspace and does not do the republish-to-a-deployment-directory approach that Eclipse uses with Tomcat.

    You don't get dynamic code reload with this option, but you can add that feature back with JRebel.

    Going further left-field, switch to a JVM language/framework that supports seeing your changes instantly without re-publishing/restarting such as:

    • Play 2 (Scala and Java)
    • Grails (Groovy)
    • Vert.X (various JVM languages).

提交回复
热议问题