Hi all,

Is there a better way to force a trailing '/' in the URL of a particular servlet than this code:

# ---------- MyPage.py

from WebKit.Page import Page

class MyPage(Page):

        def awake(self, transaction):
                '''Force a trailing '/' at the end of the URL'''
                Page.awake(self, transaction)
                if self.request().uri().split('/')[-1] == self.__class__.__name__:
                        self.sendRedirectAndEnd(self.__class__.__name__ + '/')

--T



-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to