aspose file tools
The moose likes Struts and the fly likes Downlaod  in Strut2 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Downlaod  in Strut2" Watch "Downlaod  in Strut2" New topic
Author

Downlaod in Strut2

pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 300
If i am using different name <s:file > .

Then how i can download the multiple files in strut2.

Below is my jsp file





David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I think you mean upload, right? From the client (browser) to the server (your app)?

There's no issue having multiple file input elements.
pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 300
I mean
having multiple file uplaod input elements with different name.

Can it possible.

Thanks
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I wrote: There's no issue having multiple file input elements.
pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 300
ok.

In my First post in jsp .

Then how can i get the values of uploaded files into the Action class.

Thanks
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Have appropriately-named File action properties.

Reading the documentation might be quicker:

http://struts.apache.org/2.x/docs/how-do-we-upload-files.html
Ankit Garg
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9189
    
    2

I suppose you need to use an array of File class objects in your action class to get all the files. Maybe you also need to create arrays of different properties given in this article related to file upload (like content-type etc) for getting information about different files uploaded...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Downlaod in Strut2
 
Similar Threads
Could not find a Content-Type for upload in struts2
how to print multiple file uploads in console
multiple file upload in Strut2
FreeMarker template error
how to add dynamic row in strut2