Jetty 6 is my favorite servlet container. It’s super fast, easy to embed, and very easy to use. I have run into one issue pretty often, though.
The built in jetty.sh script often hangs when given the stop command. This isn’t a big deal when I’m doing development, but it’s a problem when I’m trying to bounce Jetty in a test environment from continuous integration software like Hudson.
To solve this problem I came up with a very crude shell script to kill all jetty processes (including hung jetty.sh stop processes). It also manually exits 0 to feign success even if no Jetty is found. This keeps Hudson happy.