Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse + Tomcat - Serve webapp directly from workspace

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 to be instantly available anytime I make a change to them without having to publish them out to a separate directory. It seems like the best way to accomplish this is to serve files directly rather than a published/deployed copy of the file.


Alternatively, I'm open to other options (different application servers or IDEs) that make developing Java web applications much quicker. Publishing and redeploying every small change is eating too much time.

I've tried JRebel and FileSync (and they both work to a certain degree) but they try and patch a problem that shouldn't exist.

like image 316
John Strickler Avatar asked Jun 25 '13 18:06

John Strickler


1 Answers

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!

like image 151
rcgeorge23 Avatar answered Sep 19 '22 17:09

rcgeorge23