Two ways to use servlets to upload using MIME types are
The third is to use a FileUpload API. U can get one from http://jakarta.apache.org/commons/fileuploads.
To checkout a few examples of how to write a servlet class using these APIs, please refer the following books
1. OReilly's "Java Servlet Programming"
2. Servlets and JSPs - The JeEE Technology Web tier" by Jayson Falkner and Kevin Jones.
Let me know if you still have queries.