Ian Bicking [mailto:[EMAIL PROTECTED]] wrote: > On Thu, 2003-01-16 at 02:33, Stuart Donaldson wrote: > > The URL's are now relative to the current servlet, and absolute > > references are based on the current context. I am > > concerned about this > > breaking existing installations. In particular, the > > PSPDocs.psp page is > > broken, because it tries to include > > "../Docs/UserGuide.html" which is > > out of context. That isn't even in any context. Are there > > other psp > > pages which may have been doing this sort of thing? Any > > suggestions on > > how to fix this? > > It's no worse than the status quo -- PSPDocs.psp has been broken for a > long time. > > Should PSPDocs.psp just be including the files statically, like > self.write(open('../Docs/UserGuide.html').read()) > > ?
PSP actually has four different ways to include other pages: <%@ include file="myfile.html"%> == parse the included file for PSP content as though it was part of the current PSP file <psp:include path="myfile.html"> == use includeURL() to include the file <psp:insert file="myfile.html"> == equivalent to self.write(open('myfile.html').read()) <psp:insert file="myfile.html" static="1"> == equivalent to self.write(myfile_html_contents) where myfile_html_contents is a constant string inserted into the generated servlet The _only_ one which doesn't work in this case is the current one -- psp:include. All of the other three methods work fine regardless of whether the file is part of a context. So I just switched PSPDocs.psp to use psp:insert instead. This fixes the bug, and works better than the other two options because if the included file changes on disk, that change will automatically take effect. - Geoff ------------------------------------------------------- This SF.NET email is sponsored by: Thawte.com Understand how to protect your customers personal information by implementing SSL on your Apache Web Server. Click here to get our FREE Thawte Apache Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en _______________________________________________ Webware-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-devel