I am using Websphere Application Server 3.5.3 and using the code below. The excel file opens but it is corrupted and displays a bunch of binary data. What is strange is when I run this application in VAJ3.5.3's WTE everything works fine. Does anyone have any ideas? Are there compatibility issues with POI and WAS 3.5?
-----Original Message----- From: Garcia Vazquez, Pedro [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 4:59 AM To: POI Users List Subject: Open an EXCEL file from IE: An example public class mySevlet extends HttpServlet { public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { try { HSSFWorkbook wb = myclass.dostuff(); res.setContentType("application/vnd.ms-excel"); OutputStream outN = res.getOutputStream(); wb.write(outN); outN.flush(); } catch(Exception e) { System.out.println("Excepcion " + e); } Nombre="name.xls"; // This not necesary goTo(req,res,Nombre); } public void goTo(HttpServletRequest req, HttpServletResponse res, String nombre) { RequestDispatcher rd = req.getRequestDispatcher( nombre ); try { rd.forward(req,res); } catch (Exception e) { System.out.println("ERROR dispatcher " + e); } } } -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
