Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 30534 invoked by uid 500); 12 Mar 2003 14:08:04 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 30521 invoked from network); 12 Mar 2003 14:08:03 -0000 Received: from relay1.eu.psi.net (154.15.246.50) by daedalus.apache.org with SMTP; 12 Mar 2003 14:08:03 -0000 Received: from [213.39.28.195] (helo=mail.editronics-edu.fr) by relay1.eu.psi.net with esmtp (Exim 3.33 #1) id 18t6tk-0006tJ-00 for cocoon-dev@xml.apache.org; Wed, 12 Mar 2003 14:08:00 +0000 Received: from localhost (localhost.editronics-edu.fr [127.0.0.1]) by mail.editronics-edu.fr (Postfix) with ESMTP id 38DA21AF3C4 for ; Wed, 12 Mar 2003 15:07:59 +0100 (CET) Received: from editronics-edu.fr (localhost.editronics-edu.fr [127.0.0.1]) by mail.editronics-edu.fr (Postfix) with SMTP id B79C71AF3C3 for ; Wed, 12 Mar 2003 15:07:57 +0100 (CET) Received: from 213.39.28.194 (SquirrelMail authenticated user mleroux) by mail.editronics-edu.fr with HTTP; Wed, 12 Mar 2003 15:07:57 +0100 (CET) Message-ID: <33049.213.39.28.194.1047478077.squirrel@mail.editronics-edu.fr> Date: Wed, 12 Mar 2003 15:07:57 +0100 (CET) Subject: Re: Possible bug : problem getting request parameters while uploading a file From: To: In-Reply-To: <5.2.0.9.0.20030312074719.00a68ee0@leverageweb.com> References: <32867.213.39.28.194.1047465390.squirrel@mail.editronics-ed <5.2.0.9.0.20030312074719.00a68ee0@leverageweb.com> X-Priority: 3 Importance: Normal X-Mailer: SquirrelMail (version 1.2.8) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by AMaViS X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Well, I already knew these configuration details. Here 's my configuration : autosave-uploads = true upload-directory = /WEB-INF/work/upload-dir overwrite-uploads = rename upload-max-size = 10000000 request-factory = org.apache.cocoon.components.request.MultipartRequestFactoryImpl I can precise that the directory upload-dir is not created at cocoon initialization (it was done with cocoon 2.0.3). I think the problem comes from the request parsing or near this, because I've put some log outputs in the RequestParamAction that shows this : 14:58:46,184 DEBUG [RequestParamAction] map = {requestQuery=, context=/icartable, requestURI=/icartable/educ/teacherWork/51.html} instead of: 14:58:46,184 DEBUG [RequestParamAction] map = {requestQuery=, context=/icartable, requestURI=/icartable/educ/teacherWork/51.html, actiontype=main, file=file.txt} (or file=org.apache.cocoon.components.request.multipart.FilePartFile@321565) It looks as if the parser hasn't done its work correctly in this particular case. Michael > There were some changes between 2.0.3 and 2.0.4 WRT file uploads. The > one that pops out immediately without knowing much about your action is > that autosaving file uploads is now set to false by default in web.xml. > This means that you'll have a FilePartArray in the request. If you > weren't aware of that, can you try to modify web.xml and see if that > "fixes" it? > > Geoff Howard > > At 05:36 AM 3/12/2003, you wrote: > >> Hi ! >> >> >>I've recently upgraded from Cocoon 2.0.3 to Cocoon 2.0.4 and something >> doesn't work anymore. >>I've posted a message on cocoon-users but no one seems to be able to >> answer me. >> >>Here's a summary of the problem : >>I need to upload a file from an HTML form. I use the automatic upload >> provided by cocoon and the RequestParamAction to pass some parameters >> to my personal upload action. >>With cocoon 2.0.3, it works as I need. >>With cocoon 2.0.4, the behavior changes when method="GET" or "POST", >> and when the FILE input is filled or not ... really strange ... >> >> >> Michael >> >> >>---------------------------------------------------------------------- >> Here are the messages I sent to the cocoon-users list. They give more >> details. >> >> >> Hi ! >> >>I've recently upgraded to Cocoon 2.0.4 and something doesn't work >> anymore : I now can't get a parameter value in the sitemap with the >> RequestParamAction and the POST method. >> >> >>Here's my configuration : >>Cocoon 2.0.4, JDK 1.3, Jetty, Jboss >>MultipartRequestFactoryImpl (defined in a web.xml file) >> >> >>Here's the way I use it : >>I want to get a parameter named 'actiontype' and defined in a form and >> I want to pass its value through the sitemap to an action. >> >>I've got a sitemap.xmap file : >> >> >> >> >> >> >> >>... >> >> >>And I've got an HTML form (this page is dynamicly generated, here's an >> instance) :
>action="teacherWork/18.html"> >> >> >>... >> >> >>And I've got a cocoon action of my own with a logger showing me the >> value of the parameter named 'actiontype'. >> >> >>With cocoon 2.0.3, everything works fine. >>With cocoon 2.0.4 : when method="post" the logs say actiontype = '' >> when method="get" the logs say actiontype = 'main' Everything would be >> alright in the best world if i didn't need to use the POST method (in >> order to have a FilePartFile object in the request). >> >>I'm sure the only difference is the version of cocoon that I'm using >> although there's still the possibility that I forgot some other change >> of mine. >> >> >> >>Would anybody help me ? >> >> >> Michael >>---------------------------------------------------------------------- >> >> Hi ! >> >> >>I've recently posted an issue, and I've got new elements. >>My problem is : >>I can't pass a request parameter through the sitemap when I put a file >> path in an HTML FILE input and send it as POST multipart/form-data to a >> Cocoon 2.0.4 servlet. >> >>When I don't try to upload any file, I can pass the parameter value. >> When I try to upload a file, I can't get the parameter value anymore. >> Actually, it's as if there are no parameters in the request. >> >> >>Can somebody tell me if he can reproduce this problem on his >> environment ? >> >> >> Michael.