permaculture playing cards
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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem with struts file upload." Watch "problem with struts file upload." New topic

problem with struts file upload.

Vinay Pothnis

Joined: Mar 22, 2004
Posts: 1

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.

*** ...

// 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

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
I agree. Here's the link:
subject: problem with struts file upload.
It's not a secret anymore!