Class PageMgr

java.lang.Object
fc.web.page.PageMgr

public final class PageMgr extends Object
Manages pages. Pages are found below a web document root directory. Pages are compiled as needed and the resulting class file is loaded/run. If a page is changed, it is automatically recompiled, reloaded and rerun. If the page has a compilation error, that page remains unloaded until the error is fixed.

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 Details

    • PageMgr

      public PageMgr(PageServlet servlet, File docroot, File scratchdir, Log log)
      Constructs a new Page manager. The page manager will use the system classpath and /WEB-INF/classes, /WEB-INF/lib as the classpath for complilation. Pages can refer to any class found in those locations.
      Parameters:
      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.
  • Method Details