Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 40230 invoked from network); 30 Sep 2003 10:26:57 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 30 Sep 2003 10:26:57 -0000 Received: (qmail 56522 invoked by uid 500); 30 Sep 2003 10:26:20 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 56503 invoked by uid 500); 30 Sep 2003 10:26:20 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 56489 invoked from network); 30 Sep 2003 10:26:20 -0000 Received: from unknown (HELO relay2.softcomca.com) (168.144.1.60) by daedalus.apache.org with SMTP; 30 Sep 2003 10:26:20 -0000 Received: from M2W059.mail2web.com ([168.144.251.167]) by relay2.softcomca.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 30 Sep 2003 06:26:34 -0400 Message-ID: <207840-220039230102634329@M2W059.mail2web.com> X-Priority: 3 Reply-To: blick@fmi.uni-passau.de X-Originating-IP: 192.35.17.24 X-URL: http://mail2web.com/ From: "blick@fmi.uni-passau.de" To: users@cocoon.apache.org Subject: re:re: different upload-dirs for different applications Date: Tue, 30 Sep 2003 06:26:34 -0400 MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-OriginalArrivalTime: 30 Sep 2003 10:26:34.0168 (UTC) FILETIME=[52660B80:01C3873D] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N first -- pleast excuse my bad quoting=2E mail2web does not support better=2E= :( i'm still getting crazy trying to upload files into different directorys=2E= i did the solution as offered in the answer below=2E i inserted the example into the standard cocoon configuration (retrieved from cocoon=2Ewar)=2E perhaps 1st the code=2E --[sitemap=2Exmap begin]---- =2E=2E = = =2E=2E=2E -----[end of sitemap=2Exmap]-------------------------------------- i also changed the needed entrys in web=2Exml=2E the "class de=2Emy=2Ecocoon=2EuploadSplitter" is quite the same than the e= xample given on wiki (and below)=2E it works, it produces anoter file every time = i upload something=2E (i do not save the uploaded file yet=2E) problem is: i still get this error after uploading the file: "Resource not found No pipeline matched request: uploadFileFromUser org=2Eapache=2Ecocoon=2EResourceNotFoundException: No pipeline matched req= uest: uploadFileFromUser" and the following stacktrace [just first 3 lines=2E=2E] org=2Eapache=2Ecocoon=2EResourceNotFoundException: No pipeline matched req= uest: uploadFileFromUser =09at org=2Eapache=2Ecocoon=2Ecomponents=2Etreeprocessor=2Esitemap=2EPipelineNod= e=2Einvoke(Pipel ineNode=2Ejava:168) =09at org=2Eapache=2Ecocoon=2Ecomponents=2Etreeprocessor=2EAbstractParentProcess= ingNode=2Einvo keNodes(AbstractParentProcessingNode=2Ejava:108) =2E=2E=20 anyone can help me with a slightly longer explaination or a resource where= i can read (and understand it)? best regards and thanks a lot! peter --[old mails]---------------------------------------------------------- you need to create an action that has some logic in it which determines=20= the application trying to save the file (eg make the applications pass a=20= unique parameter in the request or so) From the wiki=20 (http://wiki=2Ecocoondev=2Eorg/Wiki=2Ejsp?page=3DFileUploadWithAction) public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters par) throws Exception { =09//use the request object below to get the additional request parameter Request request =3D ObjectModelHelper=2EgetRequest(objectModel); FilePart filePart =3D (FilePart) request=2Eget("uploaded_file"); File file =3D ((FilePartFile)filePart)=2EgetFile();=09 getLogger()=2Edebug("Uploaded file =3D " + file=2EgetCanonicalPath= ()); // here you can open an InputStream on the file or whatever // you may also want to delete the file after using it return Collections=2EEMPTY_MAP; } action can be defined in the sitemap as following =20 =2E=2E=2E=2E=2E=2E blick@fmi=2Euni-passau=2Ede wrote: >Hi, > >I have 2 applications accessing one cocoon (using different paths of >course)=2E Both apps need to upload Files=2E Is there any way to make coc= oon >save the incoming files in different directorys? > >I have seen the single-Directory solution but that does not fit my needs=2E= =20 > >Any help is highly appreciated! > >peter > > -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web=2Ecom/ =2E --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org