On Tuesday February 19, 2002 06:18 am, Edmund Lian wrote: > A quick question... What's the easiest way to get the absolute path to the > root of the current context? I have a servlet that subclasses just Page, > and the serverSideContextPath method in HTTPRequest isn't available to me. > Actually, I'd like to get come clarification about the relationship between > HTTPServlet and HTTPResponse/HTTPRequest. As far as I can see, the latter > two are never used by HTTPServlet (and therefore Page, which I am > subclassing in my SitePage)
The PowerPoint slides from my talk at Python10 cover this a little bit. You can find them on the Webware home page. But the quick answer is, in a subclass of Page, you get the HTTPRequest instance for the current transaction by doing self.request(). So self.request().serverSideContextPath() should do the trick. Similarly, self.response() gives you the HTTPResponse instance for the current transaction. - Geoff _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
