• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

File Upload - ServletFileUpload comes up empty  RSS feed

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Sorry to bother, but I've hit a wall on this one. I'm trying to upload a file using a Struts servlet, but ServletFileUpload comes up with an empty list. Here's my code:



I looked at the response using Fiddler and it looked fine (I can include if if people think it's useful).

So I put in all the log statements to try to figure out what went wrong, but they all look fine:
RequestType = POST
Req content-type is: multipart/form-data; boundary=----WebKitFormBoundaryfgssIVuNZTKaXZpA
req length=234315
file dir = C:\Program Files\tomcat5\apache-tomcat-5.5.28\temp
SizeMax & FileSize are both -1 (should mean no limit, right?)

Anyone have any idea what I'm doing wrong? There's a note about parseRequest() coming up empty if the request has already been processed. Could this be because of Struts (using Struts 2)? If so, anyone know any way around that?

Many thanks in advance,
Bruce
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why aren't you using the existing S2 file upload capability?
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone have a solution for this, I have been struggling for a day
 
Happily living in the valley of the dried frogs with a few tiny ads.
Become a Java guru with IntelliJ IDEA
https://www.jetbrains.com/idea/
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!