Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to print multiple file uploads in console

 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is the code

how to get printed the add file values.
 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi David,
can you suggest me where to change the code to get all the uploaded file names..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic