-
Notifications
You must be signed in to change notification settings - Fork 2
GWT development shell
Kristian Meier edited this page Oct 16, 2011
·
2 revisions
start the GWT development shell with
gwt run
assume we have an application MyApp with a resource users. the application has the usual rails specific views (for our users):
-
http://localhost:8888/users
the collection -
http://localhost:8888/users/new
to create a new user -
http://localhost:8888/users/<id>
to view user with id -
http://localhost:8888/users/<id>/edit
to edit user with id
but also the json or xml variants (replace json with xml resp.):
-
http://localhost:8888/users.json
the collection -
http://localhost:8888/users/<id>.json
to view user with id
the GWT application uses following url pattern:
-
http://localhost:8888/MyApp.html?gwt.codesvr=127.0.0.1:9997#users
the collection -
http://localhost:8888/MyApp.html?gwt.codesvr=127.0.0.1:9997#users/new
to create a new user -
http://localhost:8888/MyApp.html?gwt.codesvr=127.0.0.1:9997#users/<id>
to view user with id -
http://localhost:8888/MyApp.html?gwt.codesvr=127.0.0.1:9997#users/<id>/edit
to edit user with id
you will find these common url pattern also in the path annotation of the rest-service src/main/java/com/example/client/restservices/UsersRestService.java. the default baseurl for the restservices is http://localhost:8888/
so the restservices use the following urls:
http://localhost:8888/users
http://localhost:8888/users/<id>
with a json payload - rails negotiates the response format on the given HTTP_ACCEPT header field.