Forwarding after I make a word document from a servlet - I cannot forward to the next jsp
Posted on 2005-05-04
I have a Word document that I create in a servlet with ServletOutputStream, that is not the problem... the thing is I want to direct the user onto another web page when the word document has been opened ...
// this makes the word document
kickOffWordDoc( Id, response );
obj_RequestDispatcher = getServletConfig().getServletContext().getRequestDispatcher(ConstantsInf.SECURITY_LOGOUT_FILE);
obj_RequestDispatcher = getServletConfig().getServletContext().getRequestDispatcher(sNextURL);
//forward the page to the next screen
Trouble is I get exception java.lang.IllegalStateException: Cannot forward. Response already committed.