Meaningless Drivel is fun!*
The moose likes Struts and the fly likes problem with struts file upload. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem with struts file upload." Watch "problem with struts file upload." New topic
Author

problem with struts file upload.

Vinay Pothnis
Greenhorn

Joined: Mar 22, 2004
Posts: 1
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

Joined: Sep 21, 2003
Posts: 415
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
 
GeeCON Prague 2014
 
subject: problem with struts file upload.