You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rico Tijsen <ri...@picopoint.com> on 2003/01/30 15:17:54 UTC

Buffer overflow

Dear all,

I've written a little servlet that gets some binairy data from my
database and shows it to the user. Basicly an image servlet. Here's some
code:

// Set the response mime type	
response.setContentType(uiElement.getType());
		
// Get outputstream
ServletOutputStream output = response.getOutputStream();
		
// Write the byte array
byte[] data = output.write(uiElement.getByteValue());
			
output.flush();
output.close();


Now I see the following errors in my application.log:

Jan 30, 2003 2:06:35 PM org.apache.jk.common.MsgAjp cpBytes
SEVERE: Buffer overflow: buffer.len=8192 pos=29 data=30988

And this in my catalina.log:

00 00 00 00 04 00 c8 00                          | ......?.
                                                 |

Do I have to increase that buffer size (how?) or should I place .flush()
every 8k?

Thanks in advance,
Rico Tijsen




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org