I struggle this problem for a few days. My personally experience is that some sample code just don't work for some situation and is very hard to figure it out. It may need deep understanding of uploading scheme on different servlet/jsp engine.
You may look up this topic in sun's Developer's Connection site to see if there are some answers. http://forum.java.sun.com/
Urgent Question : When I am making a program with JSP uploading files ...