Hallo, deelan hat gesagt: // deelan wrote: > yes, this is the issue i wanted to point out with my post. > after "index" servlet everything is fictional: "param1" and "param2" > are just used to make the URL more friendly, so instead of write: > http://somehost.com/context/servlet?key=1param1&key2=param2 > > you reduce the url to: > http://somehost.com/context/servlet/param1/param2/ > > resources (images, CSS) should looked up after the context: > http://somehost.com/context/
I use this eccesivley in a shop prototype I'm working on. If you don't order anything and don't subscribe the newsletter, you might look at it under http://normalmailorder.com/shop/katalog/ This uses the path info to search a database. For example, the URL: http://normalmailorder.com/shop/katalog/format/dvd/ selects all items, which are DVD items. The servlet is "katalog.py". You can add selects like: http://normalmailorder.com/shop/katalog/artist/Giant/format/dvd I use absolute links almost everywhere now, because that's the most simple solution to me, but I was using a Page method called getServletRoot() whose return values I just added in front of the link to build an absolute reference like this: # in SitePage: def getServletRoot(self): req = self.request() context = req.contextName() adapter = req.adapterName() return "/".join([adapter, context]) Currently this is just: def getServletRoot(self): return "/shop" actually ;) So a link to any page would work like this: def linkTo(self, thePageName): self.writeln("%s/%s" % (self.getServletRoot(), thePageName) ) In WebKit/iHTTPRequest.py there are several utility functions for building things like that. You might want to experiment with e.g. req.servletURI() and req.urlPath() ciao -- Frank Barknecht _ ______footils.org__ ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss