protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
MultipartRequest multi = new MultipartRequest(request,"C:\\...\\jboss...\\ROOT. war",20000000);
File file = multi.getFile("datafile");
String fileName = multi.getFilesystemName("datafile");
File dest = new File(fileName);
FileInputStream source = new FileInputStream(file);
FileOutputStream destination = new FileOutputStream(dest);
FileChannel sourceChannel = source.getChannel();
FileChannel destinationChannel = destination.getChannel();
long dimension = sourceChannel.size();
sourceChannel.transferTo(0, dimension, destinationChannel);
source.close();
destination.close();
sourceChannel.close();
destinationChannel.close();
response.sendRedirect("index.jsp");
}