Fix NPE if no file was selected for upload, remove hard coded file extension
Preview uploaded file on a page, fix Glassfish virtual directory setting