On Tuesday 19 February 2002 06:03 am, Geoffrey Talvola wrote: > 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
Edmund, You should also review the summaries of the classes so you can see what their methods are. These come with your local docs. For example: http://webware.sourceforge.net/Webware/WebKit/Docs/Source/ClassList.html http://webware.sourceforge.net/Webware/WebKit/Docs/Source/Summaries/Page.py.html -Chuck _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
