Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • 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
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

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
 
We find this kind of rampant individuality very disturbing. But not this tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!