However, there is a generic, easy way to do this by setting the JVM running the web server in debug mode.
Jetty and Maven
export MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n"
mvn jetty:run
Set up your IDE for remote debugging on port 4000 and you're laughing!