Re: slow servlet filter for ByteArrayOutputStream response Wrapper

2010-06-01 Thread Konstantin Kolinko
2010/6/1 Christopher Schultz : > On 6/1/2010 5:41 AM, Konstantin Kolinko wrote: >> 2010/6/1 Manny Mondeo : >>>          httpRes.setContentLength(content.toString().length()); >> >> Also, the above, or simplier "content.length()", will give you the >> length measured in characters,  but Content-Leng

Re: slow servlet filter for ByteArrayOutputStream response Wrapper

2010-06-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Konstantin, On 6/1/2010 5:41 AM, Konstantin Kolinko wrote: > 2010/6/1 Manny Mondeo : >> httpRes.setContentLength(content.toString().length()); > > Also, the above, or simplier "content.length()", will give you the > length measured in charac

Re: slow servlet filter for ByteArrayOutputStream response Wrapper

2010-06-01 Thread Konstantin Kolinko
2010/6/1 Manny Mondeo : > httpRes.setContentLength(content.toString().length()); Also, the above, or simplier "content.length()", will give you the length measured in characters, but Content-Length must be the length measured in bytes. For a multi-byte charset such as UTF-8 those are ce

Re: slow servlet filter for ByteArrayOutputStream response Wrapper

2010-06-01 Thread Mark Thomas
On 01/06/2010 03:53, Manny Mondeo wrote: > Hi , > I have written a filter that strips the response of some html tags. > The filter is working and executing around 30milliseconds. > > The problem is that the request takes around 30 seconds to load this in a > browser. The filter gets executed fast

Re: slow servlet filter for ByteArrayOutputStream response Wrapper

2010-05-31 Thread Konstantin Kolinko
2010/6/1 Manny Mondeo : > Hi , > I have written a filter that strips the response of some html tags. > The filter is working and executing around 30milliseconds. How do you measure the time? > The problem is that the request takes around 30 seconds to load this in a > browser. The filter gets ex