Some of these problems would be aided by instrumenting the web application itself. Of course instrumenting a legacy web app is its own set of hairy problems, especially if you want to handle production servers, but even a little bit of instrumentation and logging might catch exceptions or map requests to methods actually executed.