File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Hi Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Hi " Watch "Hi " New topic


K Koteswara Rao

Joined: Oct 15, 2012
Posts: 6
Hi All ,

Any one send me code for multiple file upload functionolity in struts 1.3
jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 297


No one will send the code here .. try search on google implement the example and come with the problems. its not code mill.

K Koteswara Rao

Joined: Oct 15, 2012
Posts: 6
Hi i want to store multiple files into server .but it will not work,can any one help me .i have writen code like this

List<String> attachmentFileName=formManagementBean.getAttachmentFileName();
List<File> attachment=(List)formManagementBean.getAttachment();

if(attachment !=null){
String filePath = getServlet().getServletContext().getRealPath("/")+ "uploadfiles";
File folder = new File(filePath);
if (!folder.exists()) {

for(File file:attachment)
File savedFile = new File( file,filePath);
ByteArrayOutputStream arrayOutput = new ByteArrayOutputStream();
FileOutputStream fos = new FileOutputStream(savedFile);
bufferedOutput = new BufferedOutputStream(fos);
processedByte =, 0, theByte.length);

do {
processedByte =;
} while (processedByte != -1);

Pyla Rao
Ranch Hand

Joined: Jul 10, 2012
Posts: 51
K Koteswara Rao, welcome to the Ranch

you are new,so use right subject and use code tags to your post, and you can see how much better it looks.

Please explain where you are facing problem in your program then surly we can help you.

I agree. Here's the link:
subject: Hi
It's not a secret anymore!