javaurlurl-routinggwtp

GWTP: Direct navigation to "place" doesn't work


I'm not sure why GWTP by default doesn't allow me to navigate directly to a place in my application by typing in the URL. What I mean by that is I can reveal a place by using PlaceRequestwith the NameToken, but I can't go to the specified place by directly typing the path into the browser.

For example, I have a place savestatistikand I can load it by

PlaceRequest request = new PlaceRequest.Builder().nameToken(NameTokens.savestatistik).build();

and I can navigate there by clicking a link in the applcation and the URL changes from http://127.0.0.1:8888/MyApp.html to http://127.0.0.1:8888/savestatistik and the contents of the place is displayed as required.

But, if I type in http://127.0.0.1:8888/savestatistik in my browser I get a 404 error.

Do I need to do some kind of GWTP specific URL mapping in addition to this? I haven't seen anything like this in any tutorials on the internet that deals with this issue.


Solution

  • I solved it by removing <inherits name="com.wallissoftware.pushstate.PushState" /> from my *.gwt.xml file. Don't know what PushState even is but it seems to have fixed it.