RE: Unable to get any information why jsp page fails to generate code
I discovered that in web.xml some error pages were mentioned as genericError.htm but this file existed no where. I removed the setting of error pages from web.xml. But now when a jsp page fails to compile, nothing at all gets written to stdout (earlier there was a stracktrace mentioning /genericError.htm). Try catching all exceptions and writing them to stdout or something That is for exceptions that happen during the running of a jsp page right? If the jsp page itself fails to compile, what exception is there to catch? Thanks Kannan -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Tuesday, August 17, 2010 8:42 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/17/2010 12:22 AM, Kannan Jayaprakasam wrote: Any ideas? Try catching all exceptions and writing them to stdout or something. Is errorPage.html actually a JSP? If you'll notice, the original exception is java.lang.Exception (which isn't detailed) and then the stack trace describes the java.lang.IllegalStateException. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxqprsACgkQ9CaO5/Lv0PC3kQCffwWWfpyLgZBhGcicVpbEo6Sx zCEAnjceVrPHPdrzm4gUNQcSG9Erxy3C =w4eY -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
Re: Unable to get any information why jsp page fails to generate code
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kannan, On 9/9/2010 11:27 AM, Kannan Jayaprakasam wrote: I discovered that in web.xml some error pages were mentioned as genericError.htm but this file existed no where. I removed the setting of error pages from web.xml. But now when a jsp page fails to compile, nothing at all gets written to stdout (earlier there was a stracktrace mentioning /genericError.htm). Try catching all exceptions and writing them to stdout or something That is for exceptions that happen during the running of a jsp page right? If the jsp page itself fails to compile, what exception is there to catch? I'm not sure you /can/ catch that exception, but you might be able to. What exception gets thrown when a page won't compile? Presumably, the JspServlet throws an exception when compilation fails, instead of generating its own error page. If it throws an exception, you can configure an errorPage for that exception and log it. You should probably make sure all your JSPs compile before going into production, though ;) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyJFrgACgkQ9CaO5/Lv0PCVlwCeMlb9obxLdsDI7NSN5o+IvWbe X0kAn1JZfdnnYfe+n020UBezBFVPrkGB =SYx9 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Unable to get any information why jsp page fails to generate code
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kannan, On 8/17/2010 12:22 AM, Kannan Jayaprakasam wrote: Any ideas? Try catching all exceptions and writing them to stdout or something. Is errorPage.html actually a JSP? If you'll notice, the original exception is java.lang.Exception (which isn't detailed) and then the stack trace describes the java.lang.IllegalStateException. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxqprsACgkQ9CaO5/Lv0PC3kQCffwWWfpyLgZBhGcicVpbEo6Sx zCEAnjceVrPHPdrzm4gUNQcSG9Erxy3C =w4eY -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Unable to get any information why jsp page fails to generate code
Another cruel behaviour of tomcat is that when I click on the link of the blank jsp page yet another time, then it displays the page. But in the work folder there is no code generated seen. If I click the link yet again, I get blank display again. -Original Message- From: Kannan Jayaprakasam [mailto:kan...@arcot.com] Sent: Monday, August 16, 2010 9:11 PM To: users@tomcat.apache.org Subject: Unable to get any information why jsp page fails to generate code 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] 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? Thanks Kannan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Unable to get any information why jsp page fails to generate code
On 16/08/2010 16:59, Kannan Jayaprakasam wrote: Another cruel behaviour of tomcat is that when I click on the link of the blank jsp page yet another time, then it displays the page. But in the work folder there is no code generated seen. If I click the link yet again, I get blank display again. Tomcat, JVM, OS exact versions please. p -Original Message- From: Kannan Jayaprakasam [mailto:kan...@arcot.com] Sent: Monday, August 16, 2010 9:11 PM To: users@tomcat.apache.org Subject: Unable to get any information why jsp page fails to generate code 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] 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? Thanks Kannan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org signature.asc Description: OpenPGP digital signature
RE: Unable to get any information why jsp page fails to generate code
Tomcat 5.5 jdk1.5.0_14 Windows Xp Professional. -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Monday, August 16, 2010 10:26 PM To: Tomcat Users List Subject: Re: Unable to get any information why jsp page fails to generate code On 16/08/2010 16:59, Kannan Jayaprakasam wrote: Another cruel behaviour of tomcat is that when I click on the link of the blank jsp page yet another time, then it displays the page. But in the work folder there is no code generated seen. If I click the link yet again, I get blank display again. Tomcat, JVM, OS exact versions please. p -Original Message- From: Kannan Jayaprakasam [mailto:kan...@arcot.com] Sent: Monday, August 16, 2010 9:11 PM To: users@tomcat.apache.org Subject: Unable to get any information why jsp page fails to generate code 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] 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? Thanks Kannan - 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
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
RE: Unable to get any information why jsp page fails to generate code
Hi That is the complete stacktrace. I added the statement % response.setBufferSize(2); % 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
RE: Unable to get any information why jsp page fails to generate code
Any ideas? Thanks. -Original Message- From: Kannan Jayaprakasam [mailto:kan...@arcot.com] 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 Hi That is the complete stacktrace. I added the statement % response.setBufferSize(2); % 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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h