<%@ taglib uri="webwork" prefix="ww" %><html>
<head>
<title>File Upload Test</title>
</head>
<body>
<h1>File Upload</h1> <form action="FileUpload.action" method="POST" enctype="multipart/form-data"> <center>
<table width="350" border="0" cellpadding="3" cellspacing="0">
<tr>
<td colspan="2"><input type="file" name="FileName" value="Browse..." size="50"/></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="Submit">
</td>
</tr>
</table>
</center>
</form></body>
</html>
Enumeration e = multiWrapper.getFileNames();while (e.hasMoreElements()) {
// get the value of this input tag
String inputValue = (String) e.nextElement(); // get the content type
String contentType = multiWrapper.getContentType(inputValue); // get the name of the file from the input tag
String fileName = multiWrapper.getFilesystemName(inputValue); // Get a File object for the uploaded File
File file = multiWrapper.getFile(inputValue); // If it's null the upload failed
if (file == null) {
addActionError("Error uploading: " + multiWrapper.getFilesystemName(inputValue));
} // Do additional processing/logging...
}