Friday, 28 August 2009

Using form method post while the enctype is multipart/form-data

Today I found an interesting issue while working with HTML forms, XSLT and Servlets. I have a file upload button and my form enctype is "multipart/form-data".

Though I tried to submit the form, I was never able to retrieve the form variables in my servlet. This was running me real mad as i cross verified that my form is submitted.

I tried changing the form method to "get" and it all started working. There seems to be an issue with html in general - if the form enctype is multipart , then you have to pass all parameters in URL ( in other words - using get)

No comments:

Post a Comment

Please feel free to post your comments!

Welcome to Planet-Sujie!!

Here you can view technical articles, challenges and solutions and some of my BLOGS.


View My Stats