1. Junk characters while reading an excel file coderanch.com |
2. getting junk characters inside the excel sheet created from servlet coderanch.compublic class ExportdbServlet extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet { public ExportdbServlet() { super(); System.out.println("export servlet called"); // TODO Auto-generated constructor stub } protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException,IOException { System.out.println("export dopost called"); String path = (String) req.getAttribute("path"); java.io.FileInputStream fileInputStream = new java.io.FileInputStream( path); int i; while ((i = fileInputStream.read()) != -1) { PrintStream out = null; out.write(i); } fileInputStream.close(); } ... |