private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services for sponsored feature development
If you have a web application deployed into Jetty you can interact with it remotely from a debugging perspective easily. The basics are that you must start up the remote JVM with additional parameters and then start up a remote debugging session in Eclipse for the webapp in question. This is easily accomplished.
This example assumes you are deploying your web application into the jetty-distribution.
Assuming you have your webapp deployed into jetty, there are two different ways to approach this:
Add the required parameters on the commandline like so.
$ java -Xdebug -agentlib:jdwp=transport=dt_socket,address=9999,server=y,suspend=n -jar start.jar$ java -Xdebug -agentlib:jdwp=transport=dt_socket,address=9999,server=y,suspend=n -jar start.jar
This approach is best used if you want to debug a particular jetty-distribution and not have to remember the commandline incantations.
start.iniand uncomment the --exec line, this is required if you are adding jvm options to the start.ini file as jetty-start must generate the classpath required and fork a new jvm.
Add the parameters mentioned above in the Command Line option so your start.ini looks like this:
#=========================================================== # Configure JVM arguments. # If JVM args are include in an ini file then --exec is needed # to start a new JVM from start.jar with the extra args. # If you wish to avoid an extra JVM running, place JVM args # on the normal command line and do not use --exec #----------------------------------------------------------- --exec -Xdebug -agentlib:jdwp=transport=dt_socket,address=9999,server=y,suspend=n # -Xmx2000m # -Xmn512m # -XX:+UseConcMarkSweepGC # -XX:ParallelCMSThreads=2 # -XX:+CMSClassUnloadingEnabled # -XX:+UseCMSCompactAtFullCollection # -XX:CMSInitiatingOccupancyFraction=80 # -verbose:gc # -XX:+PrintGCDateStamps # -XX:+PrintGCTimeStamps # -XX:+PrintGCDetails # -XX:+PrintTenuringDistribution # -XX:+PrintCommandLineFlags # -XX:+DisableExplicitGC
Uncomment any other jvm environmental options you so desire for your debugging session.
Regardless of the option chosen, you should see the following lines at the top of your jetty-distribution startup.
Listening for transport dt_socket at address: 9999