Hi
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.

Thanks
Kannan


-----Original Message-----
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kannan,

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
started.

Is there more to this stack trace?

> java.lang.IllegalStateException
>             at org.apache.coyote.Response.reset(Response.java:297)
>             at org.apache.catalina.connector.Response.reset(Response.java:647)
>             at org.apache.catalina.connector.Response.reset(Response.java:911)
>             at 
> org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:357)
>             at 
> org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:213)
>             at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
>             at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>             at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>             at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
>             at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
>             at 
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
>             at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
>             at 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
>             at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
>             at java.lang.Thread.run(Thread.java:595)
> 
> 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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxpd2EACgkQ9CaO5/Lv0PAnwQCgwdmJzghDzIxPePMHFuklhdDE
l2YAnR1rY3Vf3lesXDSn3GebqPM3Kn0Q
=XoEP
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to