Return-Path: X-Original-To: apmail-cocoon-users-archive@www.apache.org Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 10FAA920E for ; Wed, 2 Nov 2011 09:29:04 +0000 (UTC) Received: (qmail 16804 invoked by uid 500); 2 Nov 2011 09:29:03 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 16761 invoked by uid 500); 2 Nov 2011 09:29:02 -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 List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 16754 invoked by uid 99); 2 Nov 2011 09:29:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2011 09:29:02 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [83.102.40.136] (HELO saarni.dnainternet.net) (83.102.40.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2011 09:28:55 +0000 Received: from localhost (localhost [127.0.0.1]) by saarni.dnainternet.net (Postfix) with ESMTP id 3CC2C6118F for ; Wed, 2 Nov 2011 11:19:45 +0200 (EET) X-Virus-Scanned: DNA Postiturva at dnainternet.net X-Spam-Score: -1 X-Spam-Level: Received: from saarni.dnainternet.net ([83.102.40.136]) by localhost (saarni.dnainternet.net [127.0.0.1]) (DNA Postiturva, port 10041) with ESMTP id GwsDtvSNWotL for ; Wed, 2 Nov 2011 11:19:44 +0200 (EET) Received: from luumupuu.dnainternet.net (luumupuu.dnainternet.net [83.102.40.213]) by saarni.dnainternet.net (Postfix) with ESMTP id 2558660B54 for ; Wed, 2 Nov 2011 11:19:44 +0200 (EET) Received: from [192.168.1.11] (85-23-20-140.bb.dnainternet.fi [85.23.20.140]) by luumupuu.dnainternet.net (Postfix) with ESMTP id E720D2BAFA for ; Wed, 2 Nov 2011 11:28:31 +0200 (EET) Message-ID: <4EB10D3C.8030105@cc.oulu.fi> Date: Wed, 02 Nov 2011 11:28:28 +0200 From: Andre Juffer Reply-To: Andre.Juffer@oulu.fi Organization: The University of Oulu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Cocoon Users Subject: [cocoon3] @Context Request request Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Flag: NO X-Old-Spam-Status: No, score=-1 tagged_above=-9999 required=6 tests=[ALL_TRUSTED=-1] autolearn=disabled I was able to resolve one or two problems. The commons fileupload FAQ gave a hint [1]. Thus, I looked for a solution that relies on a Filter and came across [2]. This Filter creates a HttpServletRequestWrapper (implements HttpServletRequest) that parses the request whenever dealing with a file upload using commons fileupload. This works very nice. I was supposed to see two FileItems [3] (which I never got up to this point) and this is now exactly what I get. Thus, the request is parsed properly and everything (including the image file) is available. However, the filter continues with aChain.doFilter(wrapper, aResponse); and this eventually results in an exception (listing below just the cocoon part): com.sun.jersey.api.container.ContainerException: javax.mail.MessagingException: Missing start boundary at com.sun.jersey.server.impl.model.method.dispatch.MultipartFormDispatchProvider.processForm(MultipartFormDispatchProvider.java:91) .... at org.apache.cocoon.rest.jaxrs.container.CocoonJAXRSServlet.service(CocoonJAXRSServlet.java:60) .... at org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:481) at org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:455) at org.apache.cocoon.servletservice.spring.ServletFactoryBean$ServiceInterceptor.invoke(ServletFactoryBean.java:245) ... com.tribc.servlet.FileUploadFilter.doFilter(FileUploadFilter.java:70) (This is the aChain.doFilter(wrapper, aResponse); ... Therefore, the request now never reaches the ImageResource. I cannot really understand the exception. The javax.mail.MessagingException is puzzling. I have to assume that in [2] something is not entirely correct, as the exception only occurs whenever the filter is employed. I do not see it. As said, the parsing appears to work just fine. Hopefully one of you has a clue. Thanks, Andr� [1] http://commons.apache.org/fileupload/faq.html#empty-parse [2] http://www.javapractices.com/topic/TopicAction.do?Id=221 [3] http://commons.apache.org/fileupload/apidocs/org/apache/commons/fileupload/FileItem.html -- Andre H. Juffer | Phone: +358-8-553 1161 Biocenter Oulu and | Fax: +358-8-553-1141 Department of Biochemistry | Email: andre.juffer@oulu.fi University of Oulu, Finland | WWW: www.biochem.oulu.fi/Biocomputing/ StruBioCat | WWW: www.strubiocat.oulu.fi Triacle Biocomputing | WWW: www.triacle-bc.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org