• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Uploading a file by parsing request

 
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I have a form where I place <input type="file" /> tags. When the form submits, I want to write the image to a server directory. So I cannot do it in the normal Struts 2.0 way. I have to parse the request and get the files out of it and write it to a server directory. I am using the following code. It works in Servlets but not in a Struts framework.



Line 25 of the above code returns either null or empty list. I call it as follows from a Struts action.



Any ideas on what I may be missing here and if there are any other alternatives, please let me know.

Thanks in advance.
 
Time flies like an arrow. Fruit flies like a banana. Steve flies like a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic