Re: File upload issue with Struts 2.1.6 (uploaded file is always null in action)

2009-09-29 Thread zsundeep
Hi Sameer, I have a sample code for file upload in Struts 2.1.6 here. This worked just fine for me. http://www.nabble.com/Unable-to-upload-files-in-Struts2-with-Spring-Security-filter-td25652380.html I was getting the file as null in action because of issue mentioned here http://www.nabble.com/W

RE: File upload issue with Struts 2.1.6 (uploaded file is always null in action)

2009-09-28 Thread Martin Gainty
email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Mon, 28 Sep 2009 09:51:29 -0700 > From: cool_sameer_fo...@yahoo.com > To: user@struts.apache.org > Subject: Re: File upload issue with Struts 2.1.6

Re: File upload issue with Struts 2.1.6 (uploaded file is always null in action)

2009-09-28 Thread David Canos
try changing the browser, Chrome and Safari works bad with some content-type 2009/9/28 hisameer > > Hi Dave, > > Thanks for pointing out the typo in the code. The issue was not that. After > scratching my head off for a week the issue was in the code: > > > > image/jpeg

Re: File upload issue with Struts 2.1.6 (uploaded file is always null in action)

2009-09-28 Thread hisameer
Hi Dave, Thanks for pointing out the typo in the code. The issue was not that. After scratching my head off for a week the issue was in the code: image/jpeg,image/gif,image/png,image/bmp,image.jpg

Re: File upload issue with Struts 2.1.6 (uploaded file is always null in action)

2009-09-25 Thread Dale Newfield
hisameer wrote: Well, I dont see any typo here. image/jpg, not image.jpg And I assume the email process stripped out the 'name="allowedTypes">' and '' parts? -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.or

Re: File upload issue with Struts 2.1.6 (uploaded file is always null in action)

2009-09-25 Thread hisameer
Well, I dont see any typo here.I have tried almost everthing. I made sure that the name must match whatever is there in the jsp page.If you see something might be typo let me know. Only the interceptors which are defined in the action mapping I copied from the struts website. -Sameer newton.dav

Re: File upload issue with Struts 2.1.6 (uploaded file is always null in action)

2009-09-25 Thread Dave Newton
hisameer wrote: image/jpeg,image/gif,image/png,image/bmp,image.jpg Is that a typo? Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional co

Re: File upload issue with Struts 2.1.6 (uploaded file is always null in action)

2009-09-25 Thread hisameer
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

Re: File upload issue with Struts 2.1.6 (uploaded file is always null in action)

2009-09-25 Thread Dale Newfield
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

Re: File upload issue with Struts 2.1.6 (uploaded file is always null in action)

2009-09-25 Thread hisameer
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. DNewfield wrote: > > hisameer wrote: >> The uploaded file is always null in my action class: > >> > > >> public void setUpload(File file) { >>

Re: File upload issue with Struts 2.1.6 (uploaded file is always null in action)

2009-09-25 Thread Dale Newfield
hisameer wrote: The uploaded file is always null in my action class: public void setUpload(File file) { this.file = file; } I believe this should be "public void setUploadFile(File file) {...}" -Dale -

Re: File upload issue with Struts 2.1.6 (uploaded file is always null in action)

2009-09-25 Thread Paweł Wielgus
Hi, have You tried running showcase app, distributed in struts apps.zip or struts all.zip, there is working example of file upload. Best greetings, Pawel Wielgus. 2009/9/25, hisameer : > > I am having trouble with uploading the file using struts 2.1.6. I have to > upload a picture(.jpg, .bmp,.jpe

File upload issue with Struts 2.1.6 (uploaded file is always null in action)

2009-09-25 Thread hisameer
I am having trouble with uploading the file using struts 2.1.6. I have to upload a picture(.jpg, .bmp,.jpeg,.png,.gif) for one of the business requirement. The application server is JBOSS 5.1.The uploaded file is always null in my action class: I followed exactly the same way mentioned in this h