//file limit size of five megabytes
MultipartRequest mpr = new MultipartRequest(request,webTempPath,
(5 * 1024 * 1024));
Enumeration enum = mpr.getFileNames();
response.setContentType("text/html");
java.io.PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet upload</title>");
out.println("</head>");
out.println("<body>");
for (int i = 1; enum.hasMoreElements();i++)
out.println("The name of uploaded file " + i +" is: " + mpr.getFilesystemName((String) enum.nextElement()) + "<br><br>");
out.println("</body>");
out.println("</html>");