response.setContentType("text/html; charset=" + Constants.CHARSET);
String message = "";
// Create a new file upload handler
DiskFileUpload upload = new DiskFileUpload();
// Get the tempdir
File tempdir = (File) getServletContext().getAttribute
("javax.servlet.context.tempdir");
// Set upload parameters
upload.setSizeMax(-1);
upload.setRepositoryPath(tempdir.getCanonicalPath());
// Parse the request
String basename = null;
String war = null;
FileItem warUpload = null;
try {
List items = upload.parseRequest(request);
// Process the uploaded fields
Iterator iter = items.iterator();
while (iter.hasNext()) {
FileItem item = (FileItem) iter.next();