• 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

FileInputStream handling

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

I have a case where I have to provide multiple file upload feature from one single screen. Code uses Struts implementation. I am not able to use FormFile. I am using simple File. The functionality works fine in case of local machine, i.e. server and browser on same machine. But when I try to upload files from other machine it fails. Please help me. It is very urgent.

Thanks in Advance

Amitesh
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by amitesh kumar:
But when I try to upload files from other machine it fails.



I think you're going to need to expand on this a little. What are the symptoms of the failure, do you get any error messages, is the failure in the browser or the server, etc, etc, etc
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by amitesh kumar:
I am not able to use FormFile. I am using simple File.


That's the problem. Using the java.io package to copy a file will work on a local system but not on a Server that's on a different system. I'd suggest you look at the samples that come with the download and get a better understanding of how to use the Struts upload classes because that's the best way to do it.
 
reply
    Bookmark Topic Watch Topic
  • New Topic