cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: post requests
Date Mon, 03 Jan 2000 17:07:16 GMT
Jeremy Quinn wrote:
> 
> On 2/1/00 at 10:58 pm, stefano@apache.org (Stefano Mazzocchi) wrote:
> 
> >> Has anyone thought about how people who are serving sites via Cocoon
> >> will handle post requests that require xml (or other) file writing, database
> >> modification, or XML node addition and modification to existing XML files on
> >> the server?
> 
> >Not a lot, but I've been thinking about this lack of symmetry.
> [...]
> >If you think deeply about it, this is a non issue: what takes care of
> >handling POST requests (or any request that modify the status of the
> >information system) is all contained into the logic realm. So, you can
> >write your custom producer, or your custom XSP page (which is an easier
> >way to do the same thing) and let cocoon handle the publishing of the
> >resulting page (normally something like "yes, your commit was succesful"
> >or something like that).
> 
> One issue for me is controlling the cache.
> 
> If I write a custom producer, or XSP Page to handle POST request data for my
> application, it's job would be to modify the XML content of the site as a result
> of user input.

Right.
 
> Would a Producer have access to Cocoon at this level?

Sure. All you need is writing permissions on the file, commit
permissions on a CVS or on every other database that contains the status
of your web site. Cocoon is on the other side: doesn't care about what
you do in your producer (exatly like a servlet engine doesn't care about
what you do in your servlets)
 
> As an example, I am developing a site made up of interlinked pages that lookup
> information like <title>, <about> etc. from each other to build html links
> (using XSL). Change the <title> of one page and several other pages that relate
> to it need re-rendering.

> My logic can determine which pages need to be refreshed, but how would it do
> this?

> As a last resort, my logic could request the pages via http with a "nocache"
> header or an artificially old "last-modified" date, but this is a bit of a long
> way around, and I have not even checked to see if Cocoon does anything with a
> nocache message.
> 
> Any thoughts on this?

The Cocoon cache will look if any of the documents that partecipate to
the production has changed. If this is so, the document is recreated.
That's it.

If the request comes to cocoon or not depending on proxying issues, this
is none of our concerns, but up to you that setup the response headers.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message