This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes how to print multiple file uploads in console Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to print multiple file uploads in console" Watch "how to print multiple file uploads in console" New topic
Author

how to print multiple file uploads in console

madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi,
in my jsp page i had multiple file uploads...if i upload single file it is printing on the console...but if i m uploading multiple files it is not printing in the console..can anyone suggest me how to do..
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
here is the code

how to get printed the add file values.
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
i had changed the code as follows...

if i click add in form it is taking only the default file name..but not the added ones..can anyone suggest me how to do.
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
any help regarding my post..here is my jsp page

if click add im getting multiple upload buttons..but if i upload it is not printing the added upload file names..it is printing only the default upload file name..any help
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Now post the code that's actually related to the file upload, namely, the action properties and their getters/setters, and the action's method that processes the file uploads. And what you're actually trying to do, because most of what you've written so far doesn't make any sense.

If you're trying to create a collection of file uploads the action property needs to be a collection, and the names generated in the HTML should also be a collection.
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
here is the
MultipleFileUpload.java

struts.xml

in jsp page 'Add' button is there if i click multiple Upload files are opening..i want to print the 'File Name,Content Type,File' that are uploaded
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi good morning,
i had searched in google..i had seen only static upload examples but i need to have dynamic upload..can anyone help me regarding my post
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
i had changed in for loop but not coming...can any one suggest me the solution

but i m getting only default file name
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The first thing I'd try is using array/collection notation on the upload elements (like foo[0], foo[1], etc.)
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi David,
can you suggest me where to change the code to get all the uploaded file names..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to print multiple file uploads in console
 
Similar Threads
How to Implement Multithreading in File Upload/Download
inputstream reading wrong file when a url is passed.
file upload with Drag and Drop facility
uploading file
Using jxl with struts to parse an xls file