File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Blank page in browser - Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Blank page in browser - "Response already committed" in logs" Watch "Blank page in browser - "Response already committed" in logs" New topic

Blank page in browser - "Response already committed" in logs

Pekka Parhi

Joined: May 03, 2004
Posts: 2
Hi everyone,
While testing my Struts web app, I occasionally receive blank pages in the browser window and "Response already committed" messages into the log file. The format of the message in the log file is like this: "Apr 29, 2004 1:45:53 PM org.apache.jk.server.JkCoyoteHandler action - INFO: Response already commited" without any stack trace. This happens very randomly and there are no particular situations where and when it occurs.
I'm not writing anything to the response in my Action classes until just calling at the end of the Actions' execute methods. In the error case, when a submit button is clicked on jsp page, the execute method of an Action class is processed normally - but instead of a target jsp page where the control was forwarded, a blank page will be shown in the browser. I wonder what causes this quite strange problem.
I'm using Struts 1.1 and Tomcat 5.0.19 on Linux server. Could one of these cause the problem? I've also posted this message to Struts forum.

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
I suspect that an exception is getting thrown, causing some output to be written to the response.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

I really don't know struts, so forgive me if this is 'not possible'.

I once had a problem with partial pages. There would be output, and then it would just stop. I'd get 1/2 or 1/3 of a page back. The logs would have 'illegal state exception'. What was happening was that an Exception is thrown at some point after the page response has already been commited, and when the container tried to forward to my error page, the container would trigger the exception.

To solve this, although not entirely in a satisfactory way, I just increased the page buffer size.

Could the same sort of thing be happening with you? (How does struts handle exception handling? Does it buffer the page response?)
I agree. Here's the link:
subject: Blank page in browser - "Response already committed" in logs
It's not a secret anymore!