Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 21419 invoked from network); 3 Jan 2000 01:19:43 -0000 Received: from pop.systemy.it (194.20.140.28) by 63.211.145.10 with SMTP; 3 Jan 2000 01:19:43 -0000 Received: from apache.org (pv49-pri.systemy.it [194.21.255.49]) by pop.systemy.it (8.8.8/8.8.3) with ESMTP id CAA09794 for ; Mon, 3 Jan 2000 02:18:10 +0100 Message-ID: <386FCA09.4C96DF3E@apache.org> Date: Sun, 02 Jan 2000 22:58:33 +0100 From: Stefano Mazzocchi Organization: Apache Software Foundation X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,it MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: post requests References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Jerm wrote: > > Dear All. > > 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? > > Is this something that should be integrated into Cocoon? > If so how? > > Or should this be handled by traditional servelet/cgi etc? > > I would personally love the symmetry .... flowing html (form content) back > through my server via XSL into XML .... closes the loop. Not a lot, but I've been thinking about this lack of symmetry. There are some technologies (see DataChannel XPages) that provide hooks for easier connection between XML web-application and other resources, but we are on the bleeding edge and there is not much you can do. 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). Some people proposed to add some XML capabilities to HTTP so that the request payload is already XML-formatted, but I don't think this solves anything. Or you could have a HTTP request filter that XML-ize it, as already proposed by others... but do you seriously think it's easier for your logic to use XML API instead of simple Servlet API methods? IMO, the search for symmetry in this area is nonsense. Logic is logic, content is content. The only content provided by a POST handler is the result message and, yes, this will be handled by Cocoon. Anything else is logic driven and Cocoon should not touch it. Careful, I'm not saying you should use pure servlets or pure java code, no, there might be APIs that make your job easier, but this has _nothing_ to do with the format used to send the page to the browser, but only to the request/response system used (which always is HTTP for servlet). -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. Friedrich Nietzsche -------------------------------------------------------------------- Come to the first official Apache Software Foundation Conference! ------------------------- http://ApacheCon.Com ---------------------