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
I suggest using sbt together with its web plugin.
The key feature of sbt
is the continuous integration mode: This basically means, sbt
fires a command, if a file changes.
So normal sbt
commands (related with the web plugin) are
container:start
container:stop
container:reload / ... container:reload
but using it in the continuous integration mode (a command starting with ~
)
~;container:start; container:reload /
it will automatically reload a web application when source code or any other files have changed.
So I just save servlets, Java sources, Scala sources whatever, and hit reload in the browser, and that really saves a lot of time.
This is the Grails feeling, but with Java as the main programming language.
Additional information
sbt
running in a terminal (I am not aware if there is a plugin for Eclipse to start it from within Eclipse)sbt
can compile both Java and Scala projects out of the box.jetty
(I am not aware if it's possible to embed tomcat
as well)sbt
, but you should read the tutorial.