Static Export configuration

From OpenCms Wiki
Revision as of 22:32, 6 November 2006 by 193.17.60.126 (Talk)
Jump to: navigation, search

Contents

Static Export Configuration

See also: Static Export

The Role of the OpenCms Error Handler Servlet during Static Export

The static export is always based on a specialized "Error-Handler" Servlet. This Servlet runs in the same web application as the main servlet of OpenCms, but is mapped to a different URL perfix(e.g. /handle404/).

There are two ways, how this Servlet is used to trigger the export of an existing file into the file system:

  • The way of triggering the Error Handler servlet happens, if a user requests a file that is not yet exported into the file system. In this case the web server issues a file not found error (HTTP code 404). The webserver must be configured so that it calls the specialized Errorhandler-Servlet of OpenCms. That Servlet will then cause the missing file to be processed and the results are written into the file system. It also returns the processing result for the requested file to the requesting client, so that the client will not notice that an internal file-not-found error had occurred inside of the server.
    After that, an exported form of the requested file will exist in the file system. This will speed all future requests for the given file, as all future requests can be directly satisfied with that exported file. This method is called Static Export On Demand.
  • Another export method is called Static Export After Publish. It also uses the error handler servlet. If this method of publishing is active, then OpenCms will export files as soon as changes are published. At that point, OpenCms will check the Export configuration for any resource sets that are defined there. When at least one file that belongs to a defined resource set is exported, then all other files that belong to that set are also exported. Resource sets are defined by one or more regular expressions annd all files whose path matches one of these expressions, belongs to the given resource set.
    If a file is exported, which belongs to no resource set at all, then all exportable files in the system are exported. The export is triggered by OpenCms calling it's own Errorhandler-Servlet for each file to be exported. This will cause these files to be exported into the file System. If the file has existed before, then it will be overwritten.

Because the Error handler is used for both static export methods, the error handler servlet must be working, otherwise the export will fail. Also, for Static Export After Publish, the URL prefix of the Errorhandler servlet must be corretly configured in the export configuration, so that opencms is able to call it's own errorhandler via HTTP.

External Links

Static Export After Publish

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox