lemonzone2010 / javamelody

Automatically exported from code.google.com/p/javamelody
0 stars 0 forks source link

Javamelody causes blank page for jsps with a buffer size > 8kb (seen on resin 4.x) #245

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a jsp with a page directive <%@page  buffer="12kb" %> and a "Hello 
world" output
2. Create a war consisting of this jsp 
   (I tested this in servlet 2.5 mode, had to delete web-fragments.xml inside javamelody.jar)
3. Deploy this war to caucho resin 4.0.29 application server
4. Invoke the URL pointing to the jsp

What is the expected output? What do you see instead?

You see a blank page. I would expect the "Hello World".

If you change the buffer size to <= 8kb, it works perfectly.
This issue prevents us from using javamelody.

What version of the product are you using? On what application server, JDK,
operating system?
javamelody 1.39.0, Sun JDK 6 Update 25, Linux 64bit, Caucho Resin 4.0.29

Original issue reported on code.google.com by mineral_...@gmx.de on 14 Aug 2012 at 10:24

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have reproduced the issue with Resin 4.0.29 and the following in a jsp file:
<%@page  buffer="12kb" %> Hello world

This is not reproduced when using Tomcat 7.0.29.
I do not know what's the problem here, except that the HttpServletResponse with 
javamelody is a CounterServletResponseWrapper (wrapped in a 
com.caucho.server.http.ToCharResponseAdapter).

There is 2 workarounds:
- use <%@page buffer="8kb" %> instead of <%@page buffer="12kb" %>, as you have 
said
- or add <% out.flush(); %> at the end of the jsp file

Original comment by evernat@free.fr on 16 Aug 2012 at 3:19

GoogleCodeExporter commented 9 years ago
Thank you for putting effort into this.

I also think that this issue is somehow related with the wrapped response but I 
haven't found out yet if the problem relies within javamelody or resin (I 
suspect the latter).

If we are able to proof that resin is the cause of this we can handover this 
issue to the resin team.

Unfortunately, I cannot put a flush at the end of all jsps files nor reduce the 
buffer size.

Original comment by mineral_...@gmx.de on 17 Aug 2012 at 8:26

GoogleCodeExporter commented 9 years ago
For information, this issue exists in Resin v4.0.4 and in v4.0.29.
But it does not exist in Resin v3.1.12.

So if it is working in v3.x with 12kb and if it is working in v4.x with 8kb, I 
suggest that it is indeed an issue in Resin.
There is a test webapp file attached.

Can I close this issue?

Original comment by evernat@free.fr on 21 Aug 2012 at 11:18

Attachments:

GoogleCodeExporter commented 9 years ago
I have created an issue for Resin:
http://bugs.caucho.com/view.php?id=5201

so closing this one.

Original comment by evernat@free.fr on 30 Aug 2012 at 5:03

GoogleCodeExporter commented 9 years ago
It will be fixed in Resin 4.0.31, according to
http://bugs.caucho.com/view.php?id=5201

Original comment by evernat@free.fr on 30 Aug 2012 at 8:18

GoogleCodeExporter commented 9 years ago
Back from vacation - thank you very much for reporting this to caucho.

Original comment by mineral_...@gmx.de on 4 Sep 2012 at 9:11