Re: [4.1.15] Jasper flushing, tagging ?

2002-11-08 Thread peter lin

thanks again for the information. I will go with setting the buffer
then.

peter


Remy Maucherat wrote:
> 
> peter lin wrote:
> 
> > thanks remy for the information that helps.  What if I decide to buffer
> > the response myself in a response wrapper?  Does catalina try to call
> > clearBuffer, reset, resetBuffer, flush or flushBuffer in the event a
> > request is passed to my errorpage?  Also, does the status code change
> > and the exception set in the request object with
> > request.setAttribute("Throwable") if html has already been sent to the
> > browser?
> 
> If you buffer everything, then Jasper will do a forward instead of an
> include.
> 
> >
> > In cases where the exception occurs before any content is sent to the
> > browser, it all works fine. I need to ensure exceptions display my
> > custom errorpage, but I'd rather not set the page buffer to an
> > arbitrarily large 64K or 100K.
> >
> 
> I think you should, since in the end it should be the same (something
> will need a buffer to hold your bytes, right ?).
> If I were you, I'd try to set a big servlet buffer size rather than a
> big JSP page buffer size (that doesn't run into the issues a servlet
> like Jasper has when trying to recycle things while being thread safe,
> so it would be more efficient; plus it will compute the content-length now).
> 
> Rémy
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [4.1.15] Jasper flushing, tagging ?

2002-11-08 Thread Remy Maucherat
peter lin wrote:


thanks remy for the information that helps.  What if I decide to buffer
the response myself in a response wrapper?  Does catalina try to call
clearBuffer, reset, resetBuffer, flush or flushBuffer in the event a
request is passed to my errorpage?  Also, does the status code change
and the exception set in the request object with
request.setAttribute("Throwable") if html has already been sent to the
browser?



If you buffer everything, then Jasper will do a forward instead of an 
include.


In cases where the exception occurs before any content is sent to the
browser, it all works fine. I need to ensure exceptions display my
custom errorpage, but I'd rather not set the page buffer to an
arbitrarily large 64K or 100K.



I think you should, since in the end it should be the same (something 
will need a buffer to hold your bytes, right ?).
If I were you, I'd try to set a big servlet buffer size rather than a 
big JSP page buffer size (that doesn't run into the issues a servlet 
like Jasper has when trying to recycle things while being thread safe, 
so it would be more efficient; plus it will compute the content-length now).

Rémy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: [4.1.15] Jasper flushing, tagging ?

2002-11-08 Thread jean-frederic clere
Remy Maucherat wrote:

jean-frederic clere wrote:


Remy Maucherat wrote:

> I was wondering if people have been testing Jasper 2 from Tomcat 5
> with flushing disabled. If testing is ok (Watchdog is, but from my
> experience it's not enough ;-) ), I would be willing to port it to the
> 4.1.x branch. I have yet to see a problem using the latest Tomcat 5
> code (I think it's a good sign).
>
> Comments ?


Tagging or annoncing a tag on Friday afternoon (at least GMT) is not
very nice for the ones that are able to do Tomcat things during their
day work.

I have some problems with HEAD requests (Content-type/Content-length)
that I would be happy to see fixed. (I have no time for the moment :-((()




And what is that problem ?


Something like the PR 14293 (and 13846).



BTW, that milestone does not need to become an official release, like 
4.1.13 and 4.1.14 (my mail wasn't a last_minute_fix_before_final 
warning). Since you also won't be around on monday, it's likely that 
I'll tag before that.

Rémy


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [4.1.15] Jasper flushing, tagging ?

2002-11-08 Thread peter lin

thanks remy for the information that helps.  What if I decide to buffer
the response myself in a response wrapper?  Does catalina try to call
clearBuffer, reset, resetBuffer, flush or flushBuffer in the event a
request is passed to my errorpage?  Also, does the status code change
and the exception set in the request object with
request.setAttribute("Throwable") if html has already been sent to the
browser?

In cases where the exception occurs before any content is sent to the
browser, it all works fine. I need to ensure exceptions display my
custom errorpage, but I'd rather not set the page buffer to an
arbitrarily large 64K or 100K.


peter lin

Remy Maucherat wrote:
> 
> peter lin wrote:
> 
> > On a related note to flushing.  I've discovered a bug, but don't want to
> > file one until I know for sure it's not a duplicate of the other flush
> > bugs already in bugzilla.
> >
> > The bug is the following:
> >
> > if a page throws an exception and an errorPage directive is set, the
> > resulting error page will print out anything left over from the parent
> > page and the errorpage. That means   and everything preceding
> > the exception is written to the browser. One way around this I found was
> > to set the buffer to a large size, like buffer="64K".
> >
> > To reproduce the bug:
> >
> > create a page with some html (has to be more than the default buffer
> > size), towards the bottom throw an exception.
> > create a custom error page.
> > using a browser load the page and the resulting out put should contain
> > html from both pages.
> >
> > This bug can be reproduced with autFlush set to true and false. If
> > people are busy, I'm willing to spend a couple hours going through the
> > code to find a fix and submit a patch. If it's not a bug, any pointers
> > would be appreciated.
> 
> If the buffer size is exceeded, then some data (the top of your page)
> will get sent to the client.
> After that, when the exception occurs, there's no way to get the data
> back (obviously).
> 
> The servlet container error handling will not do anything in that case
> (error pages and status reports will not be processed), while Jasper
> also attempts to include the error page if forwarding to it failed. IMO,
> that's not that great an idea because it creates messy output, and the
> inclusion shouldn't happen (the error should be logged and ignored).
> It's been like that for a while, AFAIK.
> 
> Rémy
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [4.1.15] Jasper flushing, tagging ?

2002-11-08 Thread Remy Maucherat
peter lin wrote:


On a related note to flushing.  I've discovered a bug, but don't want to
file one until I know for sure it's not a duplicate of the other flush
bugs already in bugzilla.

The bug is the following:

if a page throws an exception and an errorPage directive is set, the
resulting error page will print out anything left over from the parent
page and the errorpage. That means   and everything preceding
the exception is written to the browser. One way around this I found was
to set the buffer to a large size, like buffer="64K".

To reproduce the bug:

create a page with some html (has to be more than the default buffer
size), towards the bottom throw an exception.
create a custom error page.
using a browser load the page and the resulting out put should contain
html from both pages.

This bug can be reproduced with autFlush set to true and false. If
people are busy, I'm willing to spend a couple hours going through the
code to find a fix and submit a patch. If it's not a bug, any pointers
would be appreciated.



If the buffer size is exceeded, then some data (the top of your page) 
will get sent to the client.
After that, when the exception occurs, there's no way to get the data 
back (obviously).

The servlet container error handling will not do anything in that case 
(error pages and status reports will not be processed), while Jasper 
also attempts to include the error page if forwarding to it failed. IMO, 
that's not that great an idea because it creates messy output, and the 
inclusion shouldn't happen (the error should be logged and ignored).
It's been like that for a while, AFAIK.

Rémy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: [4.1.15] Jasper flushing, tagging ?

2002-11-08 Thread peter lin

On a related note to flushing.  I've discovered a bug, but don't want to
file one until I know for sure it's not a duplicate of the other flush
bugs already in bugzilla.

The bug is the following:

if a page throws an exception and an errorPage directive is set, the
resulting error page will print out anything left over from the parent
page and the errorpage. That means   and everything preceding
the exception is written to the browser. One way around this I found was
to set the buffer to a large size, like buffer="64K".

To reproduce the bug:

create a page with some html (has to be more than the default buffer
size), towards the bottom throw an exception.
create a custom error page.
using a browser load the page and the resulting out put should contain
html from both pages.

This bug can be reproduced with autFlush set to true and false. If
people are busy, I'm willing to spend a couple hours going through the
code to find a fix and submit a patch. If it's not a bug, any pointers
would be appreciated.

peter lin



Remy Maucherat wrote:
> 
> I was wondering if people have been testing Jasper 2 from Tomcat 5 with
> flushing disabled. If testing is ok (Watchdog is, but from my experience
> it's not enough ;-) ), I would be willing to port it to the 4.1.x
> branch. I have yet to see a problem using the latest Tomcat 5 code (I
> think it's a good sign).
> 
> Comments ?
> 
> After that, I plan to tag 4.1.15.
> 
> Remy
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [4.1.15] Jasper flushing, tagging ?

2002-11-08 Thread Remy Maucherat
jean-frederic clere wrote:


Remy Maucherat wrote:

> I was wondering if people have been testing Jasper 2 from Tomcat 5
> with flushing disabled. If testing is ok (Watchdog is, but from my
> experience it's not enough ;-) ), I would be willing to port it to the
> 4.1.x branch. I have yet to see a problem using the latest Tomcat 5
> code (I think it's a good sign).
>
> Comments ?


Tagging or annoncing a tag on Friday afternoon (at least GMT) is not
very nice for the ones that are able to do Tomcat things during their
day work.

I have some problems with HEAD requests (Content-type/Content-length)
that I would be happy to see fixed. (I have no time for the moment :-((()



And what is that problem ?

BTW, that milestone does not need to become an official release, like 
4.1.13 and 4.1.14 (my mail wasn't a last_minute_fix_before_final 
warning). Since you also won't be around on monday, it's likely that 
I'll tag before that.

Rémy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: [4.1.15] Jasper flushing, tagging ?

2002-11-08 Thread jean-frederic clere
Remy Maucherat wrote:

I was wondering if people have been testing Jasper 2 from Tomcat 5 with 
flushing disabled. If testing is ok (Watchdog is, but from my experience 
it's not enough ;-) ), I would be willing to port it to the 4.1.x 
branch. I have yet to see a problem using the latest Tomcat 5 code (I 
think it's a good sign).

Comments ?

Tagging or annoncing a tag on Friday afternoon (at least GMT) is not very nice 
for the ones that are able to do Tomcat things during their day work.

I have some problems with HEAD requests (Content-type/Content-length) that I 
would be happy to see fixed. (I have no time for the moment :-((()


After that, I plan to tag 4.1.15.

Remy


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[4.1.15] Jasper flushing, tagging ?

2002-11-08 Thread Remy Maucherat
I was wondering if people have been testing Jasper 2 from Tomcat 5 with 
flushing disabled. If testing is ok (Watchdog is, but from my experience 
it's not enough ;-) ), I would be willing to port it to the 4.1.x 
branch. I have yet to see a problem using the latest Tomcat 5 code (I 
think it's a good sign).

Comments ?

After that, I plan to tag 4.1.15.

Remy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: