hello! On Tue, 19 Aug 2003, Frankie wrote:
> //error message > org.apache.jasper.JasperException: getOutputStream() has already been > called > for this response > at > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja > va:2 > 54) > at > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) > at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) > > and here is my source code!!Anyone can tell me what 's wrong?? the message tells you: getOuputStream has allready been called, so take a look at JspServlet.java line 241 ... and find out where the method is called before. regards, randolph > > //source code > > <%@ > page import="java.io.*, > com.lowagie.text.*, > com.lowagie.text.pdf.*" > errorPage="error.jsp" > %><% > > > response.setContentType( "application/pdf" ); > > > Document document = new Document(); > > > > ByteArrayOutputStream buffer = new ByteArrayOutputStream(); > PdfWriter.getInstance( document, buffer ); > > document.open(); > > document.add(new Paragraph("Hello World")); > > document.close(); > > DataOutput output = new DataOutputStream( response.getOutputStream() ); > byte[] bytes = buffer.toByteArray(); > response.setContentLength(bytes.length); > for( int i = 0; i < bytes.length; i++ ) { output.writeByte( bytes[i] ); > } > %> > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.510 / Virus Database: 307 - Release Date: 2003/8/14 > > ----------------------------------------------------------------------- di randolph kepplinger, mba [EMAIL PROTECTED] / 0676-4071103 metamagix - better online solutions favoritenstrasse 19 / 1040 wien / +43.1.9902804 buero: hackengasse 27 / 1150 wien / +43.1.9902804 http://www.metamagix.net ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions