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
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
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
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
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
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
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
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
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
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) {
>>
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
-
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
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
13 matches
Mail list logo