Generate GWT place URLs on server side with the PlaceHistoryMapper

I wanted to generate an Email with an direct link to an specific Place in my GWT application. On the server side you can’t just use GWT.create(MyPlaceHistoryMapper)…

So here is the solution i figured out. Keep in head that ALL Places and the MainPlaceHistoryMapper are in the “shared” package which is usable on client and server side.

  • line 57: get the base URL of your GWT application. (in my case “http://www.tekhand.de/”)