views:

23

answers:

1

I'm trying to fix a long standing bug in our rich GUI web app. It is a GET being executed out of place without query string parameters, causing uncaught exception on the business layer on the server due to missing parameters, returned as an error page.

Environment: jQuery (UI) + DWR (allow Java and JS to call each other through AJAX) + Spring/Spring MVC

Browsers: IE8, FF3.6, Chrome 6 @ WinXP

My current tools: Chrome inspector, Firebug, HttpFox (FF sniffer extension, was useful to pinpoint the bad request)

Trying to shorten it, I couldn't find which piece of code executes the GET, probably because it was registered as an event (like blur, unload, etc) or is an async event by DWR, maybe. The whole UI is build upon DWR (AJAX) calls, so there may be a wrong call somewhere. I tried searching for method names, function pointers, events registered on jQuery, DWR interface calls, tracing back the JS stack with Firebug... no good.

My last effort was searching for some tool that could locate which piece of code executes the POST/GETs or something like it... I've been shooting in the dark ever since I ran out of ideas.

So, I'd like to know any suggestion of tools or whatever technique can be used to locate a hidden GET. Any help is appreciated.

Thanks!

A: 

If available, check your web server logs. Identify one of the bad GETs and that line should also include the referrer.

This should at least tell you which page or pages are responsible for the call which should hopefully narrow things down.

Zarigani
Thanks for your reply. I could see the referer using HttpFox. It's the same (huge) page I'm in, the same it is being requested without query string params. Once it is loaded, all further updates are async (AJAX) until the user leaves the page.
mdrg
Well, I got the culprit. Dynamically generated 'form' tags created through jQuery, with no action attribute, which defaults to the current page. The tags were only needed because jQuery Validation requires them, but sometimes they accidentally got submitted, generating the errors. Thanks for your reply, I had to carefully check the page to find it.
mdrg