Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 13094 invoked from network); 25 Sep 2009 19:55:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Sep 2009 19:55:52 -0000 Received: (qmail 62772 invoked by uid 500); 25 Sep 2009 19:55:49 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 62721 invoked by uid 500); 25 Sep 2009 19:55:49 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 62711 invoked by uid 99); 25 Sep 2009 19:55:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Sep 2009 19:55:49 +0000 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Sep 2009 19:55:40 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MrGsy-0007n6-2c for user@struts.apache.org; Fri, 25 Sep 2009 12:55:20 -0700 Message-ID: <25618257.post@talk.nabble.com> Date: Fri, 25 Sep 2009 12:55:20 -0700 (PDT) From: hisameer To: user@struts.apache.org Subject: Re: File upload issue with Struts 2.1.6 (uploaded file is always null in action) In-Reply-To: <4ABD171A.4000209@Newfield.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: cool_sameer_for_u@yahoo.com References: <25614736.post@talk.nabble.com> <4ABCF4CC.2020002@Newfield.org> <25617453.post@talk.nabble.com> <4ABD171A.4000209@Newfield.org> X-Virus-Checked: Checked by ClamAV on apache.org Hi Dale, I have added two jar files in the application these jar files are: commons-fileupload-1.2.1.jar,commons-io-1.3.2.jar.Let me know if there is a need to add additional jars. I am not getting any file name or content type so I think nothing is passed to the action class, all the values are null. The interceptors which I am using is mentioned in action mapping itself. The action mapping is: image/jpeg,image/gif,image/png,image/bmp,image.jpg /jctaylor/pages/insuranceApplication/fileUploadExample.jsp /jctaylor/pages/insuranceApplication/fileUploadExample.jsp /jctaylor/pages/insuranceApplication/fileUploadExample.jsp DNewfield wrote: > > hisameer wrote: >> Thanks for your reply. I tried to put the method public void >> setUploadFile(File file) but no success, file is still null in the >> action. > > Are the other two setters (ContentType, FileName) called? > Do you have the appropriate interceptor in place for this action? > I believe there's a .jar required for file upload that isn't part of the > standard struts distribution...do you have that in WEB-INF/lib/? > > -Dale > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org > > > -- View this message in context: http://www.nabble.com/File-upload-issue-with-Struts-2.1.6-%28uploaded-file-is-always-null-in-action%29-tp25614736p25618257.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org