File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java SE 8 for the Really Impatient
this week in the
Multiple files upload using struts
Joined: Oct 04, 2001
Aug 16, 2004 07:50:00
Iam facing a problem with uploading multiple files using
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
It is sorta covered in the
JavaRanch Style Guide
subject: Multiple files upload using struts
problem enctype and charset
Uploading files using servlet
How do I get request parameters when the form is encoded?
About form submission
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014