GWT - gwt.codesvr= tag being removed
I'm working on a GWT application. I wish to debug the client side Java code.
I start up the application from Eclipse in debug mode. The app starts in the browser with the gwt.codesvr= set correctly. I can debug at this stage. The app then redirects to the a different jsp page.
The gwt.codesvr= parameter in the URL is dropped.
The app uses History.newItem("xx") quite a bit (as described in http://code.google.com/webtoolkit/articles/mvp-architecture.html#history)
The problem is that I can't now debug the client side code.. as the gwt.codesvr= parameter has been dropped from the URL.
When I attempt to add it back in, the app History handling code runs, and the parametes is immediately dropped again.
I checked this on another PC and the same behaviour occurs. I checked in Chrome and IE8 and the same..
What is the solution ?
Thanks A m开发者_JAVA技巧illion, Fergal.
History.newItem()
keeps the query string intact (in this case, the ?gwt.codesvr=...
part), so these calls shouldn't be the problem here.
You say, that the app redirects to a different jsp page. Find out, how it does that - it may use something like Window.Location.replace(newURL)
. Make sure, that newURL contains the gwt.codesvr=...
part in its query string.
If the server performs a redirect itself (e.g. if it redirects after a POST request), then make sure, that the server adds the query string in the redirect URL. (You will probably have to submit your codeserver URL with the POST parameters in this case - because this is a client-side concept, and the server cannot simply guess it.)
精彩评论