File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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..
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to print multiple file uploads in console