• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with struts file upload.

 
Vinay Pothnis
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I am trying to upload a file using struts. I have specified the form's enctype="multipart/form-data".
And in the form bean, I have org.apache.struts.upload.FormFile attribute.

But i am not able to get the file content. The FormFile attribute is null in the form bean. When I debugged, theres this class ... CommonsMultipartRequestHandler.
and theres a section of code that returns the file items.

***
CommonsMultipartRequestHandler.java ...

// Parse the request into file items.
List items = null;
try {
items = upload.parseRequest(request);
}
***

The List variable, 'items' is being returned with 0 elements.

Could you please help me out in this?
 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

dont go in to much details because that what u r talking about list and all they are pretty much stable.just if u can send me the jsp code and action .we might get some clue
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic