• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 1.2.4 File Upload - Form File is null in action

 
C Dow
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using struts 1.2.4, running my app on WLS 10.3. I've used file upload millions of times in the past and it's been as simple as the struts example. But this latest piece of code I'm working on, when it's gets to the action the form file is null. I check to see if the request is Multipart and it is. The other field on the form has data, but the form file field is empty. Does anyone have a clue what I could be doing wrong? I'm adding the code below.

FORM CLASS



ACTION CLASS


JSP PAGE


STRUTS-CONFIG


If you have any suggestions, please let me know
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

 
C Dow
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks so much. I just discovered that I was calling setFormFile vs. setFile in my Action Form. Was completely overlooking that for 2 days.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No problem, and welcome to JavaRanch!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic