public void downloadCreateUserTemplate(HttpServletResponse response) throws IOException, URISyntaxException {
String fn = "/templates/Create users.xls";
URL url = getClass().getResource(fn);
File file = new File(url.toURI());
String mimeType = URLConnection.guessContentTypeFromName(file.getName());
if (mimeType == null)
{
mimeType = "application/octet-stream";
}
response.setContentType(mimeType);
response.setHeader("Content-Disposition", String.format("attachment; filename=\"" + file.getName() + "\""));
response.setContentLength((int) file.length());
InputStream inputStream = new BufferedInputStream(new FileInputStream(file));
FileCopyUtils.copy(inputStream, response.getOutputStream());
inputStream.close();
response.getOutputStream().close();
response.getOutputStream().flush();