This uses the python FAM (fam = File Alteration Monitor) if present. Otherwise it resorts to polling. The polling interval can be set with the AutoReloadPollInterval setting which defaults to 1 second.
Examples:
''
'../'
'../../'
You can use this as a prefix to a URL that you know is based off the home location. Any time you are in a servlet that may have been forwarded to from another servlet at a different level, you should prefix your URL's with this. That is, if servlet "Foo/Bar" forwards to "Qux", then the qux servlet should use siteRoot() to construct all links to avoid broken links. This works properly because this method computes the path based on the original servlet, not the location of the servlet that you have forwarded to.
if some_conditions_are_satisfied(): self.forward('some/other/servlet') # or self.response().sendRedirect('somewhere') self.endResponse() # continue processing...
from WebKit.AppServer import globalAppServer