// usually we would save the file, in this case, we just log :)
LOG.info("Uploaded file: " + file.getFileName());
}
dao.add(dvd);
dao.add(new DvdRental(userInfo.getUser(), dvd));
// you can add objects to result even in redirects. Added objects will
// survive one more request when redirecting.
result.include("notice", dvd.getTitle() + " dvd added");