[opencms-dev] export single resource

Markus Daniel markus.daniel at synyx.de
Thu Jul 21 13:58:04 CEST 2005


Hi Stefano,

Stefano Fiumalbi wrote:
> Hi,
> I've tried to publish and export a single resource in Opencms6 and I've
> met problems
> during the exportation of a single resource.
> How can I do to export a single resource (i.e. the file index.html)?
> In particular, I use a jsp file to publish and export the resource, but
> it not export.
> In the jsp file I've used the method
> org.opencms.staticexport.CmsStaticExportManager.exportTemplateResources
> and no errors are found,
> but the file html is not created by exportation.
> I've also changed the file opencms-importexpot.xml setting
>
>  ...
>  ...
>  <staticexport enabled="true">
>   <staticexporthandler>org.opencms.staticexport.CmsAfterPublishStaticExportHandler</staticexporthandler>
>   <exportpath>export</exportpath>
>   <defaultpropertyvalue>true</defaultpropertyvalue>
>   <defaultsuffixes>
>    <suffix key=".jpg"/>
>    <suffix key=".gif"/>
>    <suffix key=".png"/>
>    <suffix key=".doc"/>
>    <suffix key=".xls"/>
>    <suffix key=".ppt"/>
>    <suffix key=".pdf"/>
>    <suffix key=".txt"/>
>    <suffix key=".css"/>
>    <suffix key=".zip"/>
>    <suffix key=".swf"/>
>    <suffix key=".html"/>
>    <suffix key=".jsp"/>
>   </defaultsuffixes>
>   <rendersettings>
>    <rfs-prefix>${CONTEXT_NAME}/export</rfs-prefix>
>    <vfs-prefix>${CONTEXT_NAME}${SERVLET_NAME}</vfs-prefix>
>    <userelativelinks>false</userelativelinks>
>    <exporturl>http://127.0.0.1:8080${CONTEXT_NAME}/handle404</exporturl>
>    <plainoptimization>true</plainoptimization>
>    <testresource uri="/system/shared/page.dtd"/>
>    <resourcestorender>
>     <regex>/mysite/*</regex>
>     <regex>/system/galleries/.*</regex>
>     <regex>/system/modules/.*/resources/.*</regex>
>    </resourcestorender>
>   </rendersettings>
>  </staticexport>
>  ...
>  ...
>
> If I change it in <regex>/mysite/.*</regex> it export all resources
> found in opencms. Why?
> How can I do?
> Thanks.
You can set the property export=true for every file you wanted to be
exported.

Hth,
Markus

--
/**
  * Markus Daniel
  * Bachelor of Computer Science
  * Synyx oHG
  * Augustastr. 13
  * 76137 Karlsruhe
  * phone  +49(0)721 66 48 79 31
  * fax    +49(0)721 66 48 877
  * eMail  markus.daniel at synyx.de
  * www    http://www.synyx.de
  */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050721/a86f876c/attachment.sig>


More information about the opencms-dev mailing list