cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Rosenstrauch <dar...@dti.net>
Subject RE: How do I add objects to the objectModel Map
Date Fri, 21 Dec 2001 14:09:38 GMT
At 08:13 AM 12/21/01 -0500, you wrote:
>Is there any way *short* of a custom action to set response headers just
>prior to serialization? All I wish to do is to adjust response headers to
>promote short-term cacheing by an HTTP proxy (i.e., I need to set the
>Expires header to a date-time some arbitrary number of seconds subsequent to
>the time of request).
>
>Regards,
>
>Gary


I don't think there's any sitemap tags to that, if that's what you're asking.

You have access to the response object in:

* Generators
* Transformers
* Actions

So presumably you could write some code in one of these 3 places to do that.  Since an XSP
page is a generator, that might be a good place to do it.

But don't let actions scare you.  They really are very simple, and if that seems to be the
clearest way to something it's probably best to write one.

In fact the reason I wrote the "set_download" action was because:

1) I thought the sitemap (and my XSP pages) would read much clearer if I did, and
2) because I saw it had the potential to be re-used in either other places in this sitemap
or in other future Cocoon apps I write


HTH.

DR


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message