• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Multiple files upload using struts

Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone

Iam facing a problem with uploading multiple files using struts upload component. My requirement is i'll be having some text fields and more than one file elements. User can attach more than one document and he can upload them.

My jsp code goes like this

<input type="text" name="t1" >
<input type="text" name="t2" >
<input type="text" name="t3" >

<input type="file" name="uploadFile" >
<input type="text" name="uploadFile" >

Iam assigning same name to file elements. I want to get the text field values and have to upload the files. How to get both of these in Action class. My form tag in jsp looks like this

<form name="uploadForm" action="/upload-submit.do" enctype="multipart/form-data">

Please help me in this as i need it urgent. Thanks in Advance
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic