| Author |
Hi
|
K Koteswara Rao
Greenhorn
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: 296
|
|
Hi,
No one will send the code here .. try search on google implement the example and come with the problems. its not code mill.
Jatan
|
 |
K Koteswara Rao
Greenhorn
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()) {
folder.mkdir();
}
for(File file:attachment)
{
File savedFile = new File( file,filePath);
ByteArrayOutputStream arrayOutput = new ByteArrayOutputStream();
FileOutputStream fos = new FileOutputStream(savedFile);
bufferedOutput = new BufferedOutputStream(fos);
processedByte = inuputSt.read(theByte, 0, theByte.length);
do {
arrayOutput.write(theByte);
processedByte = inuputSt.read(theByte);
} while (processedByte != -1);
bufferedOutput.write(arrayOutput.toByteArray());
bufferedOutput.flush();
bufferedOutput.close();
|
 |
Pyla Rao
Ranch Hand
Joined: Jul 10, 2012
Posts: 49
|
|
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.
|
 |
 |
|
|
subject: Hi
|
|
|