This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Multiple files upload using struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Multiple files upload using struts" Watch "Multiple files upload using struts" New topic

Multiple files upload using struts

vinay bedidha

Joined: Oct 04, 2001
Posts: 9
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="/" enctype="multipart/form-data">

Please help me in this as i need it urgent. Thanks in Advance
I agree. Here's the link:
subject: Multiple files upload using struts
Similar Threads
How do I get request parameters when the form is encoded?
Uploading files using servlet
file uploading
problem enctype and charset
About form submission