[opencms-dev] Static and Dynamic Serving of Content
Michael Kraus
michael.kraus at mindmatics.de
Fri Aug 11 15:38:58 CEST 2006
Hello Christian,
thank you for your quick answer. I solved the problem now by running a static export from the Administration View, which exported *everything*.
Kind regards,
Michael
Christian Steinert schrieb:
> Michael Kraus schrieb:
>> Dear all,
>>
>> I have a problem with the static and dynamic serving of content (as
>> described in Chapter 8 of the OpenCms 5 book, however, I'm using OpenCms
>> 6.0.4).
>>
>> Within a self-written template, I read the local path to a style sheet
>> from an OpenCms property, which is set once for the whole site, and
>> construct an absolute path using CmsJspActionElement.link(). On some
>> pages of the site, I get "/opencms/mweb/589/resources/css/default.css"
>> as result, on other pages (using the same template), I get
>> "/export/sites/default/mweb/589/resources/css/default.css". The latter
>> is not working, as that file is not being exported to the local file
>> system.
>>
>> How can I control the behaviour of that link being generated? Or how can
>> I ensure that the file gets exported? I tried to play with the "export"
>> property on that file, but without success.
>>
>> Kind regards,
>> Michael
>
> Hi Michael,
>
> I must say that I don't understand, why linking to the same resource
> will sometimes point to the online and sometimes to the offline version.
> This is indeed strange.
>
> Have you checked your export configuration (opencms-vfs.xml)?
> The default export handler is CmsOnDemandStaticExportHandler.
>
> This handler has to be called by tomcat. The idea is:
> - Tomcat or apache tries to call a page
> - page cannot be found because it has not been exported yet
> - 404 handler of opencms is called
> - the 404 handler of opencms exports the page and redirects
>
> I can only suggest that you search the list archives for
> CmsOnDemandStaticExportHandler. I have not yet used this, so I don't
> have any information at hand, how the 404 handler is set up.
>
> If you want to pre-export anything, whenever your site is published
> (depending on the size of your site publishing will take quite a
> while!), then you should go for CmsAfterPublishStaticExportHandler. The
> configuration of this handler is described here:
> http://lists.opencms.org/pipermail/opencms-dev/2005q4/021164.html)
>
> Also you can export all static resources by hand, from the admin view of
> the opencms workplace. (I think somewhere in the DB tools section - not
> totally sure)
>
> Regards
> christian
>
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list