RE: Apache commons-fileupload returns an empty list
I'm using 2.2, but is is because of the default max size that it doesn't return any items? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alessandro Vincelli Sent: 15. juli 2008 17:09 To: users@cocoon.apache.org Subject: re: Apache commons-fileupload returns an empty list Which version of cocoon are you using? In cocoon 2.2 I overrode this properties, by default the value is 100kb. #upload-max-size overriding cocoon core properties org.apache.cocoon.uploads.maxsize=1024 Bye Alessandro - Original Message - Da : Magnus Haraldsen Amundsen [EMAIL PROTECTED] A : users@cocoon.apache.org Oggetto : Apache commons-fileupload returns an empty list Data : Tue, 15 Jul 2008 13:08:17 +0200 Hi, I want to use commons-fileupload to handle fileupload in my webapp. I've followed the tutorial at http://commons.apache.org/fileupload/using.html http://commons.apache.org/fileupload/using.html but line List /* FileItem */ items upload.parseRequest(request.getCocoonRequest()); always gives me an empty list. items.size() == 0. I suspect that this is because the HttpServletRequest is already parsed somewhere within Cocoon. Is there a workaround for this problem? -Magnus IMPORTANT NOTICE: This message may contain confidential information. If you have received this e-mail in error, do not use, copy or distribute it. Do not open any attachments. Delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] IMPORTANT NOTICE: This message may contain confidential information. If you have received this e-mail in error, do not use, copy or distribute it. Do not open any attachments. Delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache commons-fileupload returns an empty list
Are only suggestions :) I'm using Cforms and the upload-widget in cocoon 2.2, in order to work with upload, I overrode several configurations on the file core.properties the default value are: org.apache.cocoon.uploads.enable=true org.apache.cocoon.uploads.autosave=true org.apache.cocoon.uploads.overwrite=rename org.apache.cocoon.uploads.maxsize=102400 and another suggestion from[1] Cform upload: Also, don't forget to put the enctype attribute as multipart/form-data in the ft:form-template element, inside the template file. I repeat, these are only suggestions about cocoon upload features, I don't know your enviroment. Bye, Alessandro [1]http://cocoon.apache.org/2.2/blocks/forms/1.0/483_1_1.html - Original Message - Da : Magnus Haraldsen Amundsen [EMAIL PROTECTED] A : users@cocoon.apache.org Oggetto : RE: Apache commons-fileupload returns an empty list Data : Wed, 16 Jul 2008 08:56:09 +0200 I'm using 2.2, but is is because of the default max size that it doesn't return any items? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alessandro Vincelli Sent: 15. juli 2008 17:09 To: users@cocoon.apache.org Subject: re: Apache commons-fileupload returns an empty list Which version of cocoon are you using? In cocoon 2.2 I overrode this properties, by default the value is 100kb. #upload-max-size overriding cocoon core properties org.apache.cocoon.uploads.maxsize=1024 Bye Alessandro - Original Message - Da : Magnus Haraldsen Amundsen [EMAIL PROTECTED] A : users@cocoon.apache.org Oggetto : Apache commons-fileupload returns an empty list Data : Tue, 15 Jul 2008 13:08:17 +0200 Hi, I want to use commons-fileupload to handle fileupload in my webapp. I've followed the tutorial at http://commons.apache.org/fileupload/using.html http://commons.apache.org/fileupload/using.html but line List /* FileItem */ items upload.parseRequest(request.getCocoonRequest()); always gives me an empty list. items.size() == 0. I suspect that this is because the HttpServletRequest is already parsed somewhere within Cocoon. Is there a workaround for this problem? -Magnus IMPORTANT NOTICE: This message may contain confidential information. If you have received this e-mail in error, do not use, copy or distribute it. Do not open any attachments. Delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you. -- --- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] IMPORTANT NOTICE: This message may contain confidential information. If you have received this e-mail in error, do not use, copy or distribute it. Do not open any attachments. Delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you. -- --- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache commons-fileupload returns an empty list
Magnus, I really think the problems you are having are caused by the fact that the uploaded files have already been processed by Cocoon before you do your fileupload stuff, as I outlined in my earlier post [1]. Robin [1] http://www.mail-archive.com/users@cocoon.apache.org/msg42637.html On 16 Jul 2008, at 07:56, Magnus Haraldsen Amundsen wrote: I'm using 2.2, but is is because of the default max size that it doesn't return any items? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alessandro Vincelli Sent: 15. juli 2008 17:09 To: users@cocoon.apache.org Subject: re: Apache commons-fileupload returns an empty list Which version of cocoon are you using? In cocoon 2.2 I overrode this properties, by default the value is 100kb. #upload-max-size overriding cocoon core properties org.apache.cocoon.uploads.maxsize=1024 Bye Alessandro - Original Message - Da : Magnus Haraldsen Amundsen [EMAIL PROTECTED] A : users@cocoon.apache.org Oggetto : Apache commons-fileupload returns an empty list Data : Tue, 15 Jul 2008 13:08:17 +0200 Hi, I want to use commons-fileupload to handle fileupload in my webapp. I've followed the tutorial at http://commons.apache.org/fileupload/using.html http://commons.apache.org/fileupload/using.html but line List /* FileItem */ items upload.parseRequest(request.getCocoonRequest()); always gives me an empty list. items.size() == 0. I suspect that this is because the HttpServletRequest is already parsed somewhere within Cocoon. Is there a workaround for this problem? -Magnus IMPORTANT NOTICE: This message may contain confidential information. If you have received this e-mail in error, do not use, copy or distribute it. Do not open any attachments. Delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] IMPORTANT NOTICE: This message may contain confidential information. If you have received this e-mail in error, do not use, copy or distribute it. Do not open any attachments. Delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature
Re: Apache commons-fileupload returns an empty list
I use CForms upload widget to upload files and it works fine. Barbara On 15 Jul, 2008, at 12:08 pm, Magnus Haraldsen Amundsen wrote: Hi, I want to use commons-fileupload to handle fileupload in my webapp. I’ve followed the tutorial at http://commons.apache.org/fileupload/ using.html but line List /* FileItem */ items = upload.parseRequest (request.getCocoonRequest()); always gives me an empty list. items.size() == 0. I suspect that this is because the HttpServletRequest is already parsed somewhere within Cocoon. Is there a workaround for this problem? -Magnus IMPORTANT NOTICE: This message may contain confidential information. If you have received this e-mail in error, do not use, copy or distribute it. Do not open any attachments. Delete it immediately from your system and notify the sender promptly by e- mail that you have done so. Thank you.
RE: Apache commons-fileupload returns an empty list
We use basic HTML Forms and not Cforms. From: Barbara Slupik [mailto:[EMAIL PROTECTED] Sent: 15. juli 2008 14:38 To: users@cocoon.apache.org Subject: Re: Apache commons-fileupload returns an empty list I use CForms upload widget to upload files and it works fine. Barbara On 15 Jul, 2008, at 12:08 pm, Magnus Haraldsen Amundsen wrote: Hi, I want to use commons-fileupload to handle fileupload in my webapp. I've followed the tutorial at http://commons.apache.org/fileupload/using.html http://commons.apache.org/fileupload/using.html but line List /* FileItem */ items = upload.parseRequest(request.getCocoonRequest()); always gives me an empty list. items.size() == 0. I suspect that this is because the HttpServletRequest is already parsed somewhere within Cocoon. Is there a workaround for this problem? -Magnus IMPORTANT NOTICE: This message may contain confidential information. If you have received this e-mail in error, do not use, copy or distribute it. Do not open any attachments. Delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you. IMPORTANT NOTICE: This message may contain confidential information. If you have received this e-mail in error, do not use, copy or distribute it. Do not open any attachments. Delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you.
Re: Apache commons-fileupload returns an empty list
Hi Magnus, I ran into this recently too... It might help if you understand the relevant part of Cocoon's request processing... 1. By default all requests are passed through the servlet filter org.apache.cocoon.servlet.multipart.MultipartFilter. 2. MultipartFilter calls org.apache.cocoon.servlet.multipart.RequestFactory 3. If the request is of type multipart/form-data, RequestFactory uses org.apache.cocoon.servlet.multipart.MultipartParser to parse the request into a org.apache.cocoon.servlet.multipart.MultipartHttpServletRequest 4. MultipartHttpServletRequest or HttpServletRequest is passed up the filter chain. The MultipartHttpServletRequest that is created provides direct access to the uploaded Parts as if they were request parameters, usually negating the need for commons-fileupload. I've never done it myself, but I guess if you wanted to handle the request directly you could try removing the MultipartFilter configuration from your web.xml. Hope this helps, Robin at org.apache.cocoon.servlet.multipart.RequestFactory.getServletRequest to see how uploaded files are parsed automatically by Cocoon On 15 Jul 2008, at 12:08, Magnus Haraldsen Amundsen wrote: Hi, I want to use commons-fileupload to handle fileupload in my webapp. I’ve followed the tutorial at http://commons.apache.org/fileupload/ using.html but line List /* FileItem */ items = upload.parseRequest (request.getCocoonRequest()); always gives me an empty list. items.size() == 0. I suspect that this is because the HttpServletRequest is already parsed somewhere within Cocoon. Is there a workaround for this problem? -Magnus IMPORTANT NOTICE: This message may contain confidential information. If you have received this e-mail in error, do not use, copy or distribute it. Do not open any attachments. Delete it immediately from your system and notify the sender promptly by e- mail that you have done so. Thank you. smime.p7s Description: S/MIME cryptographic signature
re: Apache commons-fileupload returns an empty list
Which version of cocoon are you using? In cocoon 2.2 I overrode this properties, by default the value is 100kb. #upload-max-size overriding cocoon core properties org.apache.cocoon.uploads.maxsize=1024 Bye Alessandro - Original Message - Da : Magnus Haraldsen Amundsen [EMAIL PROTECTED] A : users@cocoon.apache.org Oggetto : Apache commons-fileupload returns an empty list Data : Tue, 15 Jul 2008 13:08:17 +0200 Hi, I want to use commons-fileupload to handle fileupload in my webapp. I've followed the tutorial at http://commons.apache.org/fileupload/using.html http://commons.apache.org/fileupload/using.html but line List /* FileItem */ items upload.parseRequest(request.getCocoonRequest()); always gives me an empty list. items.size() == 0. I suspect that this is because the HttpServletRequest is already parsed somewhere within Cocoon. Is there a workaround for this problem? -Magnus IMPORTANT NOTICE: This message may contain confidential information. If you have received this e-mail in error, do not use, copy or distribute it. Do not open any attachments. Delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]