amanas
amanas

Reputation: 520

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?

Upvotes: 1

Views: 797

Answers (4)

graemeboy
graemeboy

Reputation: 610

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

Upvotes: 1

Riley Lark
Riley Lark

Reputation: 20890

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.

Upvotes: 0

amanas
amanas

Reputation: 520

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

Upvotes: 0

z00bs
z00bs

Reputation: 7498

Maybe what you're looking for: Pretty URLs in Google App Engine

Upvotes: 1

Related Questions