First you need to add the following environmental variables on your Windows/Linux environment.
MAVEN_OPTS = -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=yNow go to your maven web project location through command line and start the jetter server -> mvn jetty:run
Now in eclipse debug configuration, add a remote Java application instance on port 4000. Then Add some debug points to your codes and start the remote app instance on debug mode. You can see the steps from following screen shots.
In this manner you can debug your java web apps and find out the bugs. With this way you can debug your java web app.
if you are using maven latest version( Maven 2.0.8 or later)
mvnDebugcommand instead of
mvnand attach a debugger on port 8000.
Love to hear from you! feedback(comments) are always welcome