Please help me out how to set content boundary for the Content-Type ( multipart/form-data ) in the setRequestHeader method of XMLHttpRequest object . I have two forms in my jsp wherein i use one form for making an Ajax call to upload a file while my other form carries all the input fields which are being used in my mvc architecture.
Without setting RequestHeader in XMLHttpRequest object , is there a way where content type reaches my servlet ?
How do normal forms submit contenttypes and headers by default to Servlets ?
"Learning is a Culture where your Eagerness & Curiosity plays a major Role".
I just used a seperate JSP which contains only form where ENCTYPE i have declared as multipart/form-data and submitted the entire page to a servlet rather than an Ajax call. This solved my problems of getting content type & bounday values properly .