public final class PageMgr extends Object
A new PageMgr should be instantiated for each unique root directory (for example with multiple virtual hosts or users, each having their own root directory).
Constructor and Description |
---|
PageMgr(PageServlet servlet,
File docroot,
File scratchdir,
Log log)
Constructs a new Page manager.
|
Modifier and Type | Method and Description |
---|---|
Page |
getPage(String contextRelativePath)
Returns the
Page corresponding the the page path. |
static void |
main(String[] args)
Interactive page manager use/testing.
|
public PageMgr(PageServlet servlet, File docroot, File scratchdir, Log log)
servlet
- the Molly Servlet. This is optional and can be
null when creating/testing the PageMgr from
the command line.docroot
- absolute path to the document root directory within
which the pages are found. This is the directory that
correspond to the "/" location of the webapp.scratchdir
- absolute path to a scratch dirctory where intermediate
and temporary files can be written. This is where the
translated page-->java file will be created.log
- a logging destination.