public Template handleRequest( HttpServletRequest request, HttpServletResponse response, Context context ) {

		Template template=null;
		int length = 0;
		SubmitArticleModel sam = new SubmitArticleModel();
		context.put("apptitle", "E-com Journal");
		if(ServletFileUpload.isMultipartContent(request)){
			String articleID="";
			ServletOutputStream outStream;
			try {

				HttpSession session = request.getSession();
				String UserRole=(String) session.getAttribute("userRole");
				int authorID = (Integer) session.getAttribute("userID");
				System.out.println(UserRole);
				if (UserRole == "AuthorReviewer"){
					try{
						if(ServletFileUpload.isMultipartContent(request)){
							List<FileItem> multiparts = new ServletFileUpload(new DiskFileItemFactory()).parseRequest(request);

							for(FileItem item : multiparts){
								if(item.isFormField()){
									articleID = item.getFieldName();

									System.out.println("articleID: "+articleID);
								}
							}

							String filePath = sam.getArticleRevision(articleID);
							sam.setArticleDownloaded(articleID, authorID);
							System.out.println("filePAth: "+filePath);
							File file = new File(filePath);
							outStream = response.getOutputStream();

							response.setContentType("application/octet-stream");
							response.setContentLength((int) file.length());
							String[] filePathSplit=filePath.split("/");
							response.setHeader("Content-Disposition", "attachment; filename=\""
									+ filePathSplit[(filePathSplit.length)-1] + "\"");

							byte[] byteBuffer = new byte[BUFSIZE];
							DataInputStream in = new DataInputStream(new FileInputStream(file));

							while ((in != null) && ((length = in.read(byteBuffer)) != -1)) {
								outStream.write(byteBuffer, 0, length);
							}

							in.close();
							outStream.close();
						}
					}catch (IOException e) {
						e.printStackTrace();
					}
				}
			}catch (Exception e) {
				e.printStackTrace();				}
		}
		return template;
	}