• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hi

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All ,

Any one send me code for multiple file upload functionolity in struts 1.3
 
Ranch Hand
Posts: 300
Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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();
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.


 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic