tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kannan Jayaprakasam <>
Subject RE: Unable to get any information why jsp page fails to generate code
Date Tue, 17 Aug 2010 04:22:18 GMT
Any ideas? 


-----Original Message-----
From: Kannan Jayaprakasam [] 
Sent: Monday, August 16, 2010 11:32 PM
To: Tomcat Users List
Subject: RE: Unable to get any information why jsp page fails to generate code

That is the complete stacktrace.
I added the statement
<% response.setBufferSize(20000); %>
As the first line in the jsp page, but still I'm getting the same genericError.htm message
in the tomcat log file.


-----Original Message-----
From: Christopher Schultz [] 
Sent: Monday, August 16, 2010 11:08 PM
To: Tomcat Users List
Subject: Re: Unable to get any information why jsp page fails to generate code

Hash: SHA1


On 8/16/2010 11:41 AM, Kannan Jayaprakasam wrote:
> On tomcat logs I don't find any useful information why the jsp page
> failed to generate code and only a blank gets displayed. All I ever
> see for any mistake in the jsp page is the same message below:
> Aug 16, 2010 9:02:29 PM org.apache.catalina.core.StandardHostValve custom
> SEVERE: Exception Processing ErrorPage[exceptionType=java.lang.Exception, location=/genericError.htm]

You have an error while processing an error page. I suspect, given the
stack trace, that the error page (/genericError.html) hasn't yet been

Is there more to this stack trace?

> java.lang.IllegalStateException
>             at org.apache.coyote.Response.reset(
>             at org.apache.catalina.connector.Response.reset(
>             at org.apache.catalina.connector.Response.reset(
>             at org.apache.catalina.core.StandardHostValve.custom(
>             at org.apache.catalina.core.StandardHostValve.throwable(
>             at org.apache.catalina.core.StandardHostValve.invoke(
>             at org.apache.catalina.valves.ErrorReportValve.invoke(
>             at org.apache.catalina.core.StandardEngineValve.invoke(
>             at org.apache.catalina.connector.CoyoteAdapter.service(
>             at org.apache.coyote.http11.Http11Processor.process(
>             at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(
>             at
>             at
>             at org.apache.tomcat.util.threads.ThreadPool$
>             at
> This is causing me great deal of pain, as I have to undo my changes
> letter by letter to finally detect what is wrong. Can someone please
> suggest how to get a more meaningful message?

The real problem is that either genericError.html or some other page has
already generated enough output to cause the response to be "committed",
or actually sent to the browser. If an error occurs, the error page
isn't supposed to just get dumped into the middle of the original page.
Instead, the response should be "reset" (that is, all content dropped)
and a new (error) page sent to the client.

In your case, you've passed the point of no return and therefore the
"reset" cannot occur properly, which generates the IllegalStateException.

You have a couple of options:

1. Fix your servlets/JSPs/whatever so that they don't throw any
exceptions up to the container. This can be done with reckless use of
try/catch blocks, or it can be done by considering a less fragile
architecture (e.g. don't write JSP code that can fail, don't have
servlets generate any responses, etc.).

2. Make the buffer size for the response much larger than it is, now
(the default, I believe, is 8KiB). This is an easy fix, but you will
need to consider the impact on your server if you increase the buffer
size for every single response your server emits.

Hope that helps,
- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


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

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

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

View raw message