[opencms-dev] Static Export to Two Web Servers

Michael Moossen m.moossen at alkacon.com
Tue Aug 2 18:14:06 CEST 2005


Hi, Saranyu!

> I tried to setup the static export to be able to export the content to 
> two web servers according to the path of the content.
> Right now I am totally blank on how to do it.
the static export feature has been extended after the 6.0 final release to
simplify that.

check out the cvs head and see the new definition of the
opencms-importexport.xml

----
OpenCms Static-Export Advanced Features

After the OpenCms 6.0.0 Release, several improvements have been made to the
Static Export feature:

    * Real File System Rules (general improvement)
      Until now, you could specify a set of settings for the static export, like
<rfs-prefix>, <exportpath> and <userelativelinks>, which were global settings
and you had no possibility to have different settings for different resource
sets. The idea of the rfs-rules is to complement this global settings, being
able to specify different settings for different resource sets.
    * Export Rules (AfterPublish/Full static export specific new feature)
      An export rule let you specify a set of resources to export if a modified
resource matches a set of rules. And the main idea behind it, is to optimize
the needed time used to do an static export after publish. Until now, every
time a resource has been published, OpenCms mades a static export of all
resources in the vfs! (at least all resources matched by the <regex> patterns
in the <resourcetorender> node) since there was no possibility to know the
dependencies of a file. So, this new feature lets OpenCms know which are the
dependencies of a set of resources.

This new features as also all the other configuration settings for the Static
Export should be given in the
${CONTEXT_NAME}/WEB-INF/config/opencms-importexport.xml configuration file.

Some general issues you have to be aware of when static exporting a site:

    * No form of dinamic interaction with the user can be static exported, like
contact forms or search functions. If need such functionallity use an hibrid
solution with the On-Demand export feature, how to use this feature is detailed
in the com.alkacon.documentation.howto_httpd_tomcat_modproxy documentation
module.
    * Dinamic pages and resources, i.e. JSP pages with parameters for generating
images, or style sheets, or what ever, can be statically exported using the
CmsJspActionElement.link(String) method or the <cms:link> tag given to it the
whole path with all parameters, when referencing it. For instance:
      new CmsJspActionElement.link(pageContext,
request,response).link("/system/modules/mytemplate/style.css?param1=value1&param2=value2")
      And things like:
      new CmsJspActionElement.link(pageContext, request,
response).link("/system/modules/mytemplate/style.css") +
"?param1=value1&param2=value2"
      will not work, because the parameters are not encoded.
    * You will also have troubles when using javascript to display pages,
because you have no access to the CmsJspActionElement.link(String) method, so
do not do that.
    * Be also sure the Export user had at least permission to read the resources
to export.
    * Do not forget to configure your export url correctly, it should be
something like http://127.0.0.1:8080/${CONTEXT_NAME}/handle404.
    * You can also mark a resource as internal so it will not be exported, this
can be done in the Secure/Export dialog.
    * In apache is important to configure the DirectoryIndex option so that the
index_export.html files are also view as default directory content.


-- 
Regards
Michael Moossen
Alkacon Software GmbH - The OpenCms Experts
http://www.alkacon.com



Quoting Saranyu Lavanyakul <saranyu at cmu.edu>:

> Hi all,
> 
> I tried to setup the static export to be able to export the content to 
> two web servers according to the path of the content.
> Right now I am totally blank on how to do it.
> 
> Does anyone have experience setting this up before? Please suggest.
> 
> Thanks very much.
> 
> -- 
> Saranyu Lavanyakul
> CMS Project Analyst
> The H. John Heinz III School
> Carnegie Mellon University
> (412)-268-6199
> 
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
> 


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the opencms-dev mailing list