you cannot get OutPutStream in JSP because, If you look at the Java code generated for your JSP, you notice that how "out" implicit objects are created? it is by using response.getOutputStream(). So you will get this run time exception when you try to get OutputStream more than once for same response object.
Instead of JSP, you can forward it to Servlet and do the same in servlet.
Joined: Nov 07, 2006
Thanks Prabhu.how will I generate the outout in this case?I am using struts framework I ll put it in action.Then HOw to generate the pdf?