File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Uploading a file by parsing request

 
Fawad Ali
Ranch Hand
Posts: 116
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic