• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

struts 2 multiple file upload save path to database

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a huge form in which multiple documents of different types are being uploaded. Doing the same in Struts 2 using the multiple file upload logic of struts.



These are the parameters of my class(action). The name of the form fields have to be "upload" as per the class.



(some fields may be optional to upload) The files get uploaded correctly using copyFile. However within the upload[] array, how do I know which file belongs to which parameter as they bear the same name "upload", as I need to save the filename to database.

Please advise.
 
Ranch Hand
Posts: 300
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Alvito,

Refer this Link which will give you the idea.
Index will be same for the content and file name.

Regards
Jatan
 
Brace yourself while corporate america tries to sell us its things. Some day they will chill and use tiny ads.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic