GWT, AppEngine and pretty url (human url)
Can anybody show a working example of how to get pretty urls on a GWT project over AppEngine.
I know that you will suggest to look at UrlRewriteFilter. I have been burning it for 3开发者_运维知识库 days and get no succedd.
Please, could help?
Maybe what you're looking for: Pretty URLs in Google App Engine
This will work, and it's really easy:
def main():
application = webapp.WSGIApplication([('/', MainHandler), ('/(.*)', PostHandler)], debug=True)
class PostHandler(webapp.RequestHandler):
def get(self, slug):
As explained in the article on Pretty Urls with Google App Engine
I followed that link till urlrewrite filter, wich is what i am using at the moment.
I get to transform domain/?user=43434&mensage=89898 to domain/user43434-mensage89898 which is quite good for me.
But i can not transform it to domain/43434/8989.
When i try to do this i always get a fail consisting on my services cannot find an *.wgt.rpc file.
In other words, I am not able to run the next example when i use GWT: http://zenoconsulting.wikidot.com/blog:16
You can do it on the client side with the History class if you're willing to have a #
at the beginning of your URLs. In my app teachers can access their grades at http://activegrade.com/#calculus/grades, for example. The History object receives "calculus/grades" and you can parse it from there.
GWT 2.1 introduces the concept of Places - you could look into that as well.
精彩评论