• 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

Apache FileUpload: My form is going crazy!

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!. I'm really stuck, I hope anyone could help me.

This is my JSP



And this is my Servlet



When I complete the form with a text and a pdf the result of the prints are:

contenido:null
titulo:null
titulo:Ejemplo

¿How can be possible?. The parameter recovered with getAttribute works even when the form is multipart and it can't work in that way, and the parser of the commons upload returns everything null when parses the multipart data.

I hope some help, I'm stuck since yesterday :S. Thanks!
 
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
Please UseCodeTags when posting code or configuration. Unformatted code and configuration is unnecessarily difficult to read.

You can edit your post by using the button.
 
Aique Fernandez
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've solved it!.

The code is ok. The reason of this strange behaviour is the Struts. I have a filter in the web.xml to redirect everything on my web application throught the Struts Dispatcher. Maybe because I'm uploading the file using a servlet instead an Struts action, the file can't be sent properly.
reply
    Bookmark Topic Watch Topic
  • New Topic