Eclipse + Tomcat - Serve webapp directly from workspace

后端 未结 9 679
旧时难觅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:00

    I've never really liked the WTP plugin that gets bundled with Eclipse.

    In the past I've had a lot of success with the Sysdeo Tomcat plugin for Eclipse.

    It uses the compiled classes that Eclipse builds for you, so when you make an interface-compatible change (like changing some stuff inside a method), this gets deployed immediately without requiring a restart. Changing method signatures or adding new methods within a class do require a restart, but since there's no lengthy WAR-building step, the whole build/deploy cycle is reduced anyway.

    Additionally, the Sysdeo plugin uses the static assets from your workspace, so no need to copy or deploy these. Just make a change, refresh your browser, and you see the change right away.

    Unfortunately it looks like development of the plugin ground to a halt a couple of years ago. The latest supported version of Eclipse, according to the matrix on their website, is 3.6. According to this page however, the plugin still works with Eclipse 4.2 (Juno).

    Hope this helps. Using Sysdeo is really a much nicer experience than WTP!

提交回复
热议问题