[opencms-dev] problem with static export

M Butcher mbutcher at grcomputing.net
Mon Oct 13 17:59:00 CEST 2003


check in the opencms/WEB-INF/config/opencms.properties file. 

Also, if the file property "export" is set to false, then the file will
not be exported.

Matt

On Mon, 2003-10-13 at 06:01, Raghu V. N wrote:
> Hi,
>  
>    I am new to Opencms and facing some issues with static export.
> Can somebody please help with this?
>  
> 1) I am unable to export projects:
>  
> Publishing project ...
> No static export required
> Checking filesystem links ...
> .. filesystem link check finished
> ... the project has been published
>  
> Should it be enabled somewhere?
>  
>  
>  
> 2)  When I publish the resources directly, the resource is not found
> in the 
> folder mentioned in the static export path.
>  
> Publishing resource ...
> Publishing /release/installation.html
> Publishing /system/bodies/release/installation.html
> Static export, number of starting links is: 2
> Skipping /release/installation.html
> Skipping /system/bodies/release/installation.html
> ... static export finished
> Checking filesystem links ...
> .. filesystem link check finished
> ... the resource has been published
>  
>  
>  
> 3) The static export icon in the administration appears grey.
>     How can I enable it?
>  
> 4) Also can I specify absolute path such as C:\export?
> It does not seem to work for me.
>  
>  
> opencms.properties file
>  
> # Parameters for static export
> #################################################################################
>  
> # if static export is disabled nothing is exported and the rules are
> not used.
> # For the handeling of the link tags one standard rule is generated
> with the
> # url_prefix_http value. So you can still configure the servletpath.
> staticexport.enabled=true
>  
> # the static export is controlled by the resource property export. It
> has 6 possible
> # values: true, false, dynamic, https, https_enabled and
> dynamic_https_enabled.
> # With the property staticexport.default.export you can decide whitch
> value is used if
> # a resource and all parentfolders don't have the the property export
> set.
> # If your site shoud be exported except a few resources you set the
> default to true
> # and add the export=dynamic property to the folder where the dynamic
> pages are. If
> # your site is mostly dynamic you set the default to dynamic and add
> the export= true
> # property to the pics and the download folder.
> # Only the values 'true' and 'dynamic' are allowed.
> staticexport.default.export=true
>  
> # the path where to save the exported pages. This path may be relative
> or absolute.
> staticexport.path=export/
>  
> # Prefix variables. The export prefix defines where to find the static
> reources.
> # The http prefix defines the way to the dynamic resources in OpenCms.
> The https and
> # the servername are used only for ssl. (If you use ssl you have to
> set the values like:
> # https://server.de/${WEB_APP_NAME}/opencms for the https prefix and
> http://server.de
> # for the servername)
> # The String ${WEB_APP_NAME} will be replaced by the name of
> # the webapplication. These variables can also be used in the
> rulesets.
> url_prefix_export=/${WEB_APP_NAME}/export
> url_prefix_http=/${WEB_APP_NAME}/opencms
> url_prefix_https=
> url_prefix_servername=
>  
> # the name of the ruleset used to replace links while exporting, in
> the online project,
> # in the offlineproject and for the name in the extern file system.
> There are two sets
> # of rules. Depending of the staticexport.default.export parameter the
> linkrules.true or
> # the linkrules.dynamic are used.
> linkrules.true.export=exportrules
> linkrules.true.online=exportrules
> linkrules.true.offline=offlinerules
> linkrules.true.extern=externrules
> linkrules.dynamic.export=dynamic_exportrules
> linkrules.dynamic.online=dynamic_exportrules
> linkrules.dynamic.offline=dynamic_offlinerules
> linkrules.dynamic.extern=dynamic_externrules
>  
> # the start rule used for extern and export (not for online and
> offline).
> # (the rules are regular expressions in perl5 standard)
> #exportfirstrule=s#.([^&\?]*)=([^&\?]*)#_$1$2#g
> #
> # The start rule feature is removed. Instead there is a new feature:
> While exporting
> # if after the dynamic rueles nothing has changed the parameters of
> the link will be
> # decoded in the name. so "/index.html?newsid=27&size=100" is replaced
> by "/index_402.html"
> # where 402 is the id of the link in the database. Further rules
> (after the dynamic ones)
> # will be processed with the new link.
>  
> # The rulesets for linkreplacement as comma seperated lists
> # You can use the ${WEB_APP_NAME} variable for the webapplication name
> and the
> # four prefix variables defined above (${url_prefix_export},
> ${url_prefix_http},...).
> # They will be replaced befor using the regular expression.
> # In addition to this it is possible to define the place where the
> dynamic
> # generated rules should be used instead of a rule use the expression
> # *dynamicRules* (including the *'s). OpenCms replaces this with the
> dynamic
> # generated rules.
> # There are two types of dynamic rules. The first one is generated
> with the
> # resourceproperty "exportname". For each resouce with this property a
> rule
> # will be generated that replaces the absolute path of this resource
> with the
> # value of the property. It is principally used to get nice short
> foldernames
> # on the disc.
> # The second kind of dynamic rules are generated with the property
> "export".
> # The possible values are explained below.
> #
> # Possible values for the "export" property are:
> #
> # export=true
> #   The marked resource is exported.
> #   For the online project, all links that point to this resource are
> #   build according to the "linkrules.true.extern" (see above)
> ruleset.
> #   All links found on the marked resource that have been
> #   marked with the <link/> tag are followed and also checked for
> export.
> #   Example:
> #      VFS =/index.html
> #      RFS =${webapp_path}/opencms/export/index.html
> #      Link=<a href="${url_prefix_export}/index.html"/>
> #
> # export=false
> #   The marked resource is not exported.
> #   For the online project, all links that point to this resource are
> #   build according to the "linkrules.true.online" (see above)
> ruleset.
> #   Links on the marked resource that are marked with the <link/> tag
> are
> #   NOT followed and therefore not exported.
> #   Example:
> #      VFS =/index.html
> #      RFS =(none)
> #      Link=<a href="${url_prefix_http}/index.html"/>
> #
> # export=dynamic
> #   The marked resource is not exported.
> #   For the online project, all links that point to this resource are
> #   build according to the "linkrules.dynamic.online" (see above)
> ruleset.
> #   All links found on the marked resource that have been
> #   marked with the <link/> tag are followed and also checked for
> export.
> #   Example:
> #      VFS =/index.html
> #      RFS =(none)
> #      Link=<a href="${url_prefix_http}/index.html"/>
> #
> # Static exort and https:
> #   If you intent to use https settings with the export,
> #   you must extend the ${url_prefix_http} to include the http
> protocol,
> #   and also set the ${url_prefix_https} and the
> ${url_prefix_servername}.
> #   In this case, all links will be absolute links that contain server
> name
> #   and protocol (but see also the resource setting
> "export=https_enabled"
> #   explained below).
> #
> # export=https
> #   The marked resource is not exported, but treated as a https
> resource.
> #   For the online project, all links that point to this resource are
> #   build according to the "linkrules.true.online" (see above)
> ruleset,
> #   using the "url_prefix_https" Prefix.
> #   All access to this resource that is NOT using the https protocol
> #   is forbidden!
> #   All links found on the marked resource that have been
> #   marked with the <link/> tag are followed and also checked for
> export.
> #   Example:
> #      VFS =/index.html
> #      RFS =(none)
> #      Link=<a href="${url_prefix_https}/index.html"/>
> #
> # export=https_enabled
> #   The marked resource is not exported.
> #   For the online project, all links that point to this resource are
> #   build according to the "linkrules.true.extern" (see above)
> ruleset.
> #   No protocol will be used for the link, so that a browser that
> #   was in https mode will be staying in https, while a http request
> #   will stay in http mode.
> #   Use this parameter esp. for images to prevent the dreaded
> webbrowser warning
> #   that tells you something like "The page you are about
> #   to view uses secure and unsecure data".
> #   All links found on the marked resource that have been
> #   marked with the <link/> tag are followed and also checked for
> export.
> #   Example:
> #      VFS =/index.html
> #      RFS =(none)
> #      Link=<a
> href="/${web_app_name}/${opencms_servlet_name}/index.html"/>
> #
> # export=dynamic_https_enabled
> #   The marked resource is not exported, but treated as a https
> resource.
> #   This is like "export=dynamic" with the addition that the resource
> #   will only be delivered if the request is a https request,
> #   Example:
> #      VFS =/index.html
> #      RFS =(none)
> #      Link=<a href="${url_prefix_https}/index.html"/>
> #
> # The dynamic rules are only for export, online and extern rules.
> Don't use them in
> # the offlineruleset.
> # The parameterreplacement is done in the dynamic rules. So it works
> together with
> # the exportname rule. If you have a rule befor the dynamic rules that
> is triggered
> # the parameterreplacement will not happen.
> ruleset.offlinerules=s#^#${url_prefix_http}#
> ruleset.exportrules=*dynamicRules*, \ 
> s#^#${url_prefix_export}#
> ruleset.externrules=*dynamicRules*
>  
> ruleset.dynamic_offlinerules=s#^#${url_prefix_http}#
> ruleset.dynamic_exportrules=*dynamicRules*, \ 
> s#(.*\.gif$)#${url_prefix_export}$1#, \ 
> s#(.*\.jpg$)#${url_prefix_export}$1#, \ 
> s#(.*\.pdf$)#${url_prefix_export}$1#, \ 
> s#(.*\.css$)#${url_prefix_export}$1#, \ 
> s#(.*\.doc$)#${url_prefix_export}$1#, \ 
> s#(.*\.exe$)#${url_prefix_export}$1#, \ 
> s#(.*\.xls$)#${url_prefix_export}$1#, \ 
> s#(.*\.js$)#${url_prefix_export}$1#, \ 
> s#(.*\.zip$)#${url_prefix_export}$1#, \ 
> s#(.*\.jpeg$)#${url_prefix_export}$1#, \ 
> s#(.*\.txt$)#${url_prefix_export}$1#, \ 
> s#^#${url_prefix_http}#
> ruleset.dynamic_externrules=*dynamicRules*, \ 
> s#(.*\.gif$)#$1#, \ 
> s#(.*\.jpg$)#$1#, \ 
> s#(.*\.pdf$)#$1#, \ 
> s#(.*\.css$)#$1#, \ 
> s#(.*\.doc$)#$1#, \ 
> s#(.*\.exe$)#$1#, \ 
> s#(.*\.xls$)#$1#, \ 
> s#(.*\.js$)#$1#, \ 
> s#(.*\.zip$)#$1#, \ 
> s#(.*\.jpeg$)#$1#, \ 
> s#(.*\.txt$)#$1#, \ 
> s#.*##
>  
> # When set to true the links in the static export that refer to pages
> in the static export
> # will be relative instead of absolute. Enable this feature only if
> you use the standard
> # ruleset.
> #
> relativelinks_in_export=false
>  
>  
>  
>  
> Thanks,
> Raghu
>  
>  
-- 
M Butcher <mbutcher at grcomputing.net>



More information about the opencms-dev mailing list