[opencms-dev] How to specify where static export should be exporting files ?

Claus Priisholm cpr at codedroids.com
Fri Aug 26 09:18:33 CEST 2005



pat sad wrote:
> Thank you for your clear explanation Michael.
> 
> Now, I'd want to use static export to retrieve the files that I
> inserted in openCMS using the Extended HTML import, but will that
> convert them back to html files when I view them after the static
> export or will I always have the XML inside the pages ?
> 
> I read in the mailing list on how to set static export, but I am
> confused on how to do so, here is a quote I took from an answer
> related to my question :
> 
> 
>>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.
> 
> 
> I am new to openCMS and would that mean that I have to change values
> in the openCMS-import-export file ?
> 
> where do I change those values : 
> 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")
> 
> 
> Thank you for your support.

The opencms-importexport.xml file is in the ...WEB-INF/config/ 
directory. You probably don't have to change anything unless you're have 
a special place where you want the files to be put upon export (in the 
real filesystem).
Per default it does on-demand export, meaning that not until the 
reasource is actualley requested is it exported. You can go to the 
Administraion-view and do a static export - this will force all 
resources intended for static export to be exported.

Online documentation includes examples on how to setup the apache + 
tomcat combo also with respect to serving statically exported content.


> 
> On 8/24/05, Michael Emmerich <m.emmerich at alkacon.com> wrote:
> 
>>I guess you are mixing something up here........
>>
>>OpenCms always stores its pages in an internal xml format.
>>This content is inserted into the templates and OpenCms generates the
>>HTML out of it.
>>
>>The Extended HTML-Import is a tool to convert already existing HTML
>>pages into the xml format that is used by OpenCms, so that you can use
>>the content of your already existing pages within a template.
>>
>>The Synchronization is ment to synchronize the OpenCms Virtual File
>>system with the one of your server, its main usage for template
>>development and not for the end user (content editor). So if you
>>synchronize your imported pages, you will of course find some xml files
>>on your server after that.
>>
>>What you are looking for is the "static export" feature. If enabled,
>>OpenCms will staticly export your published generated pages to the
>>server filesystem. Search the mailing list for this subject.
>>
>>I think you also should take a look at the documentation modules which
>>are delivered with OpenCms to get an idea how templates etc work in OpenCms.
>>
>>Regards,
>>Michael Emmerich
>>
>>Alkacon Software - The OpenCms Experts
>>
>>
>>
>>pat sad schrieb:
>>
>>>Is there a way to get the static export to export somewhere
>>>specifically, and how do I do that ?
>>>
>>>Also, I noticed openCMS generates XML content when I import my html
>>>pages and export them through synchronization is there a way to avoid
>>>creating that XML content and leaving them back to the way they were
>>>??
>>>
>>>Please help!
>>>
>>>On 8/23/05, pat sad <hlp.psaad at gmail.com> wrote:
>>>
>>>
>>>>I am using openCMS 6.
>>>>
>>>>On 8/23/05, Claus Priisholm <cpr at codedroids.com> wrote:
>>>>
>>>>
>>>>>The property format in your example is used by OpenCms 5, the
>>>>>"/sites/default" concept is from OpenCms 6, so which version are you using?
>>>>>
>>>>>pat sad wrote:
>>>>>
>>>>>
>>>>>>I am new at openCMS and I need help on setting up openCMS to do static Export.
>>>>>>
>>>>>>I have read in the mailing archive that we have to set up the
>>>>>>properties file and set up the path but when i set it up it only
>>>>>>exports everything in the sites/default/ folder
>>>>>>
>>>>>>My files are not in these folders, and I would like to have them
>>>>>>exported. How do I proceed ?
>>>>>>
>>>>>>Here is what I added in the opencms.properties file:
>>>>>>
>>>>>># Parameters for static export
>>>>>>##########################
>>>>>>staticexport.path=/site/
>>>>>>url_prefix_export=
>>>>>>url_prefix_http=/${WEB_APP_NAME}/opencms
>>>>>>url_prefix_https=
>>>>>>url_prefix_servername=
>>>>>>
>>>>>>Where  /site/  is a file that i created in my webapps folder. Please help.
>>>>>>
>>>>>>
>>>>>>_______________________________________________
>>>>>>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
>>>>>>
>>>>>
>>>>>--
>>>>>Claus Priisholm, CodeDroids ApS
>>>>>cpr (you know what) codedroids.com - http://www.codedroids.com
>>>>>
>>>>>Javadocs and other OpenCms stuff:
>>>>>http://www.codedroids.com/community/opencms
>>>>>
>>>>>
>>>>>_______________________________________________
>>>>>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 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
>>
>>--
>>Alkacon Software
>>An der Wachsfabrik 13
>>50996 Koeln, DE
>>Tel: +49 (0)2236 382614
>>Fax: +49 (0)2236 382620
>>Email m.emmerich at alkacon.com
>>
>>
>>_______________________________________________
>>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 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
> 

-- 
Claus Priisholm, CodeDroids ApS
cpr (you know what) codedroids.com - http://www.codedroids.com

Javadocs and other OpenCms stuff: 
http://www.codedroids.com/community/opencms



More information about the opencms-dev mailing list