• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts 1.2.4 File Upload - Form File is null in action

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

 
C Dow
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No problem, and welcome to JavaRanch!
 
reply
    Bookmark Topic Watch Topic
  • New Topic