Caching of old versions of Google Maps

Hi

I’m starting to play with the Google Maps plugin. In my app, I’m creating a new GoogleMap inside a TabSheet and adding it to my page. Whenever I do a change to something, the newly updated version of the solution is not shown in the browser. I suspect that there is some caching going on somewhere that makes the browser show the old version, not the new one.

I have tried using the refresh command in the browser
I have tried using the internal Eclipse browser as well as an external Firefox browser
I have tried restarting my Tomcat server
I have tried cleaning the working directories of my Tomcat server
I have tried closing the tab in my browser

None of these techniques worked. The only thing that I found to work was to do a restart of the complete browser (Firefox) or the complete Eclipse environment. This way, the new version was shown the first time it is displayed.

This behavior is quite annoying during development. I would like an easier way to “force” the new version to be shown. If this could be implemented somehow in my code, that would be great. Or, perhaps it can be handled through some setting in the browser.

Any ideas on how to solve this?

Regards
/ Fredrik Ferm

Have you tried appending “?restartApplication” after your URL? Ie. if your app is at eg.
http://localhost:8080/MyApp
, try pointing your browser at
http://localhost:8080/MyApp?restartApplication

This should force the server to restart your application, and serve the new version to the browser.

Thank you, this seemed to do the trick.

Does anybody know how to setup Eclipse so that the internal browser has this URL pattern automatically?

/ Fredrik

Not quite that, but you could disable session serialization in your development environment - if you are using Tomcat, so to Project Explorer → Servers → MyTomcat → context.xml and uncomment the “Manager” line as indicated in the comments. That way, Tomcat will not try to reload the old application state when you restart it etc.

Then use “Debug as…” on the whole project, not a file in it, and later run it from the “Debug” toolbar button as one of the recently launched applications.