This is a frequently asked question from many of our customers at Virtual Pair Programmers, so I thought a blog post to capture the details would be in order. I'll focus on Tomcat and Glassfish here, because we use them on our courses - but the details are the same for other servers.
for Glassfish - 1) Run the server under debug. The easiest way is to run as normal, then go to the admin console. Go to configurations -> server-config (not default config) -> JVM Settings. Click Debug Enabled. These options will be different on different glassfish versions (I'm on 4), but you should be able to find them. Check the port that the debugger will run on - it will be part of the debug options and usually the default is 9009
The Spring Webservices course got so big that we had to cut a few minor topics, and I promised on the video that I would write some blog posts covering them. Here's the first of them, how to write a "Custom Message Converter".
You probably don't need to do this very often - I've never had to do this "in real life". But it is a useful exercise to get a better understanding of what those message converters are doing.
Recall that in Spring, a MessageConverter is a class that is capable of converting a regular Java domain object to a REST representation (and back again). Spring has a small set of default converters already built in, but the two main ones are for JSON (most common representation used in REST) and XML.