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 19339 invoked from network); 22 Jun 2000 19:35:14 -0000 Received: from cr2167256193.cable.net.co (HELO ricardo) (root@216.72.56.193) by locus.apache.org with SMTP; 22 Jun 2000 19:35:14 -0000 Received: from apache.org (IDENT:ricardo@localhost.localdomain [127.0.0.1]) by ricardo (8.9.3/8.9.3) with ESMTP id OAA28909 for ; Thu, 22 Jun 2000 14:31:31 -0500 Sender: ricardo@ricardo Message-ID: <39526992.33FD4F52@apache.org> Date: Thu, 22 Jun 2000 14:31:30 -0500 From: Ricardo Rocha Organization: Plenix X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: javax.servlet.context.tempdir todo References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Cool! Thanks a lot, Willie Willie Wheeler wrote: > > Hi all, > > I'm brand new to open source development, so I hope I'm submitting this > proposed change correctly. (Someone please tell me if I'm not.) Anyway, > one of the Cocoon2 todo's is to make Cocoon use the > javax.servlet.context.tempdir instead of having to use the cocoon.xconf > file. I've modified the CocoonServlet.java and ProgramGeneratorImpl.java > files. > Here are the diff files: > > CocoonServlet diff > ------------------ > 60a61,63 > > String tempDir = > > > ((java.io.File)this.context.getAttribute("javax.servlet.context.tempdir")).g > etPath(); > > System.setProperty("org.apache.cocoon.defaulttempdir", tempDir); > > ProgramGeneratorImpl diff > ------------------------- > 98,99c98,99 > < > < this.repositoryName = params.getParameter("repository", > "./repository"); > --- > > String tempDir = > System.getProperty("org.apache.cocoon.defaulttempdir"); > > this.repositoryName = params.getParameter("repository", tempDir); > > This allows you to use the cocoon.xconf to specify the temporary repository > if you like. If you don't specify the repository parameter in cocoon.xconf, > the default repository for saves is the value of > javax.servlet.context.tempdir. > > Bye for now, > Willie