//setting the paths for writing the PDF
String fileName = (String) sess.getAttribute("fileName");
ServletContext sc = getServletConfig().getServletContext();
String path = sc.getRealPath("/") + "repository/";
FileOutputStream out = new FileOutputStream(new File(path+fileName));
baosPDF.writeTo(out);
out.flush();
out.close();
//redirect to conclusion page
RequestDispatcher disp = getServletContext().getRequestDispatcher("/finish_1.jsp");