title: How can I handle multipart/form-data POST requests in my java servlet?
body: <p>I'm having a very hard time dealing with multipart/form-data requests with my java application server.  From what I have found out, the servlet 3.0 specification provides methods such as HttpServletRequest.getParts(), which would be ideal for processing the form data uploaded to my servlet.</p>
  
  <p>However, this method is part of the 3.0 servlet specification, and my application server (Tomcat 6) does not support this yet.  Even with a valid 3.0 web.xml file and the java EE 6 libs, I get the following exception when trying to call getParts():</p>
  
  <pre><code>java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getParts()Ljava/util/Collection;
  </code></pre>
  
  <p>Switching application servers is not really a feasible option for this project.  Are there any third-party libraries available for processing multipart/form-data within java servlets?</p>