REST style URis with GWT

51 views
Skip to first unread message

Monika Solanki

unread,
Feb 17, 2012, 4:09:05 PM2/17/12
to google-we...@googlegroups.com
Hello,

When I make a GWT app, the URL is usually associated with an HTML page. However I would like to expose a more restful URI style for my web app.
Instead of http://www.xyz.com/myapp/TestApp.html I would like http://www.xyz.com/myapp/testapp. I would like to know if there is a way to achieve this in GWT.

Thanks

Kolban

unread,
Feb 17, 2012, 5:48:07 PM2/17/12
to google-we...@googlegroups.com
My thinking is that there might not be as much value in this as you think (opinion).  To me, a REST service returns a response in the form of data (JSON or XML) while a GWT application returns a HTML stream for direct presentation in a browser.  What is it about the "TestApp.html" termination of the URL that you see as something you want to change?

Neil

András Csányi

unread,
Feb 17, 2012, 6:05:59 PM2/17/12
to google-we...@googlegroups.com

It depends on your webserver. You should set up your server to do
this, it's called url_rewrite, mod-rewrite or user friendly urls. If
you have only the mentioned url containing TestApp.html file than you
should set up your server to route your requests not only to
index.html but also TestApp.html file. It's kind of default setup.

Anyway, this service doesn't depends on GWT.

--
- -
--  Csanyi Andras (Sayusi Ando)  -- http://sayusi.hu --
http://facebook.com/andras.csanyi
--  ""Trust in God and keep your gunpowder dry!" - Cromwell

Reply all
Reply to author
Forward
0 new messages