Rob,

I have servlets that send much larger html pages to the client with no
problem.  I convert the stringbuffer to a string before sending it
though.  Here is the code.

String strHTML = buf.toString();
toClient.println(strHTML);  //Write out the HTML that was built
toClient.close();           // Close the writer

I would guess that you have a html error in your file.  A good testing
tool is to use the "view source" from within the browser and then copy
and paste the html into a tool like frontpage.  It should help you find
the html error.

John

Rob Jago wrote:
>
> Hello
>
>         I am wondering if anyone has encountered the following problem and
> if so, how did you work around it.
>
> I am creating  StringBuffer that contains a large table (about 140 rows with
> 4 columns per row)  (roughly 30000 characters in total)
>
> I checked the contents of this html table (contained in the StringBuffer)
> before sending it down and all the appropriate html tags are there.  But
> when  this same table (StringBuffer and all)  is sent back to Internet
> Explorer I get strange results..   often the HTML table is not formatted
> properly with some rows not being displayed and others concatenated together
> (causing the display to a 8 column table as opposed toa 4 column table)
>
>    I am getting the same errors whether sending the StringBuffer via
> PrintWriter or via  ServletOutputStream or via sending the String to a JSP.
>
>       I am quite sure I will be redoing pieces of the code but I am
> wondering if there is a way to avoid this (ex.  setting the size of the file
> size to send back as in the setHeader method call)
>
> thanks for any input
>
> Rob Jago
> Programmer Analyst
> Ottawa
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to