protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
	{
		if (ServletFileUpload.isMultipartContent(req)) {
			Deck deck = new Deck();
			
			// Create a factory for disk-based file items
			DiskFileItemFactory factory = new DiskFileItemFactory();

			// Set factory constraints
			factory.setSizeThreshold(MAX_MEMORY_SIZE);
			factory.setRepository(new File("/tmp"));

			// Create a new file upload handler
			ServletFileUpload upload = new ServletFileUpload(factory);

			// Set overall request size constraint
			upload.setSizeMax(MAX_REQUEST_SIZE);

			// Parse the request
			try {
				List<?> items = upload.parseRequest(req);
				
				FileItem item = findDeck(items);
				if (item == null) {
					throw new FileUploadException("No deck file item found");
				}
				
				String filename = FilenameUtils.getName(item.getName());
				File file = new File(filename);
				
				item.write(file);		
				
				BufferedReader reader = null;
				try {
					
					String currentLine;
					reader = new BufferedReader(new FileReader(file));
		 
					while ((currentLine = reader.readLine()) != null) {
						// Create card and add it to deck
						System.out.println(currentLine.substring(currentLine.lastIndexOf("\t") + 1));
						int quantity = Integer.parseInt(currentLine.substring(0, 1));
						String cardNumber = currentLine.substring(currentLine.lastIndexOf("\t") + 1);
						Card card = Database.getInstance().getCardByCardNumber(cardNumber);
						for (int i = 0; i < quantity; i++){
							deck.getMainDeck().add(card);
						}
					}
				} catch (IOException e) {
					e.printStackTrace();
				} finally {
					try {
						if (reader != null) {
							reader.close();
						}
					} catch (IOException ex) {
						ex.printStackTrace();
					}
				}

			} catch (Exception e) {
				e.printStackTrace();
			}
			
			System.out.println("Gets here");
			
			req.getSession().setAttribute("deck", deck);
			
			//req.getRequestDispatcher("/view/deckBuilder2.jsp").forward(req, resp);
			resp.sendRedirect("/deckBuilder");
		}
	}