<%@ page language="java" import="java.util.*, oracle.jsp.webutil.fileaccess.*" 
errorPage="error.jsp" contentType="text/html;charset=UTF-8"%>
<html>
<body>
<% String userdir = "/"; %>
<jsp:useBean id="upbean" 
   class="oracle.jsp.webutil.fileaccess.HttpUploadBean" >
<jsp:setProperty name="upbean" property="destination" value="<%= userdir %>" />
</jsp:useBean>

<%   upbean.setBaseDir(application, request);
     upbean.upload((HttpServletRequest)request); 
     Enumeration fileNames = upbean.getFileNames();
        while (fileNames.hasMoreElements()) { %>
         <br><%= (String)fileNames.nextElement() %>
     <% } %>
<br>Done!
</body>
</html>
