Re: Error page messages
David Kerber wrote: On 11/30/2012 5:59 PM, André Warnier wrote: Christopher Schultz wrote: ... I've even seen a site with a Perl-based (or was it PHP-based) service .. must have been PHP, not Perl, I'm sure. We Perl guys don't do things that way. As I was telling Leo off-line, we have a nice global switch called fatals_to_browser, which you can just turn on on a dev website if you want to see the stack traces, and turn off for a prod website where you don't. So when you deliver software to customers, you turn it off, and it just looks a lot better. Not that you need the feature too often either, because Perl always finds a way to interpret your code so as to do something, instead of That's really scary! just giving up. It was meant to be, how do you say this, tongue in cheek ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error page messages
On 30/11/2012 21:00, Leo Donahue - RDSA IT wrote: Are there standardized server responses that one should expect to see when dealing with java.lang, javax.servlet and javax.faces exceptions that should be displayed to the client? You mean status codes or error pages? If an exception isn't handled* by the app then it's 500 and a stacktrace if you haven't configured a custom error page. Those packages probably have a few tens of exceptions that could be thrown. I don't know that I would expect to see any of these on a public website, as I am likely not to care what happens on the server I'm browsing, as long as the server can recover/redirect. Catch them at the appropriate point in your code, or configure a custom error page. p * uncaught exception is the usual term. -- [key:62590808] signature.asc Description: OpenPGP digital signature
RE: Error page messages
-Original Message- From: Pid [mailto:p...@pidster.com] Sent: Friday, November 30, 2012 3:04 PM To: Tomcat Users List Subject: Re: Error page messages On 30/11/2012 21:00, Leo Donahue - RDSA IT wrote: Are there standardized server responses that one should expect to see when dealing with java.lang, javax.servlet and javax.faces exceptions that should be displayed to the client? You mean status codes or error pages? Error pages. If an exception isn't handled* by the app then it's 500 and a stacktrace if you haven't configured a custom error page. Those packages probably have a few tens of exceptions that could be thrown. I don't know that I would expect to see any of these on a public website, as I am likely not to care what happens on the server I'm browsing, as long as the server can recover/redirect. Catch them at the appropriate point in your code, or configure a custom error page. And what kind of information does one show the user in a custom error page? I don't know of any public facing websites, off hand, that show uncaught exception messages. I was just trying to decide what I would show, if anything, if I configured a custom error page for certain types of exceptions, such as java.lang, or javax.servlet, or javax.faces. p * uncaught exception is the usual term. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error page messages
On 30/11/2012 22:09, Leo Donahue - RDSA IT wrote: -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Friday, November 30, 2012 3:04 PM To: Tomcat Users List Subject: Re: Error page messages On 30/11/2012 21:00, Leo Donahue - RDSA IT wrote: Are there standardized server responses that one should expect to see when dealing with java.lang, javax.servlet and javax.faces exceptions that should be displayed to the client? You mean status codes or error pages? Error pages. If an exception isn't handled* by the app then it's 500 and a stacktrace if you haven't configured a custom error page. Those packages probably have a few tens of exceptions that could be thrown. I don't know that I would expect to see any of these on a public website, as I am likely not to care what happens on the server I'm browsing, as long as the server can recover/redirect. Catch them at the appropriate point in your code, or configure a custom error page. And what kind of information does one show the user in a custom error page? I don't know of any public facing websites, off hand, that show uncaught exception messages. I was just trying to decide what I would show, if anything, if I configured a custom error page for certain types of exceptions, such as java.lang, or javax.servlet, or javax.faces. A polite message saying oops, or a fail whale, or a unicorn... p -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: Error page messages
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Leo, On 11/30/12 5:09 PM, Leo Donahue - RDSA IT wrote: -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Friday, November 30, 2012 3:04 PM To: Tomcat Users List Subject: Re: Error page messages On 30/11/2012 21:00, Leo Donahue - RDSA IT wrote: Are there standardized server responses that one should expect to see when dealing with java.lang, javax.servlet and javax.faces exceptions that should be displayed to the client? You mean status codes or error pages? Error pages. If an exception isn't handled* by the app then it's 500 and a stacktrace if you haven't configured a custom error page. Those packages probably have a few tens of exceptions that could be thrown. I don't know that I would expect to see any of these on a public website, as I am likely not to care what happens on the server I'm browsing, as long as the server can recover/redirect. Catch them at the appropriate point in your code, or configure a custom error page. And what kind of information does one show the user in a custom error page? I don't know of any public facing websites, off hand, that show uncaught exception messages. I was just trying to decide what I would show, if anything, if I configured a custom error page for certain types of exceptions, such as java.lang, or javax.servlet, or javax.faces. How about: web.xml: error-page exception-typejava.lang.Throwable/exception-type location/WEB-INF/uncaught-error.html/location /error-page uncaught-error.html: !DOCTYPE html html headtitleError/title/head body h1Error/h1 p Aw, crap. /p /body /html You can put anything in there you want, man. If the stack trace seems too ugly for you (it really is, honestly), then replace it with something else. Need some inspiration? Try Google. Or http://ux.stackexchange.com/questions/15955/how-to-create-a-useful-500-internal-server-error-page - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlC5MMQACgkQ9CaO5/Lv0PC2SwCeNW8Q8enE9m08sq9j6tYVFRX/ csoAniXbINKCbXd1ix+J9Nd3dHo0piLE =EnMx -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Error page messages
From: Leo Donahue - RDSA IT [mailto:leodona...@mail.maricopa.gov] Subject: RE: Error page messages I don't know of any public facing websites, off hand, that show uncaught exception messages. You need to get out more - there are tons of poorly implemented websites that will splatter stack traces to the browser, especially during those odd hours when something is out for backup, maintenance, etc. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Error page messages
-Original Message- From: Pid [mailto:p...@pidster.com] Sent: Friday, November 30, 2012 3:13 PM To: Tomcat Users List Subject: Re: Error page messages On 30/11/2012 22:09, Leo Donahue - RDSA IT wrote: -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Friday, November 30, 2012 3:04 PM To: Tomcat Users List Subject: Re: Error page messages On 30/11/2012 21:00, Leo Donahue - RDSA IT wrote: Are there standardized server responses that one should expect to see when dealing with java.lang, javax.servlet and javax.faces exceptions that should be displayed to the client? You mean status codes or error pages? Error pages. If an exception isn't handled* by the app then it's 500 and a stacktrace if you haven't configured a custom error page. Those packages probably have a few tens of exceptions that could be thrown. I don't know that I would expect to see any of these on a public website, as I am likely not to care what happens on the server I'm browsing, as long as the server can recover/redirect. Catch them at the appropriate point in your code, or configure a custom error page. And what kind of information does one show the user in a custom error page? I don't know of any public facing websites, off hand, that show uncaught exception messages. I was just trying to decide what I would show, if anything, if I configured a custom error page for certain types of exceptions, such as java.lang, or javax.servlet, or javax.faces. A polite message saying oops, or a fail whale, or a unicorn... p Good options, and very tempting. Maybe one of these? http://tinyurl.com/bvl2gko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Error page messages
-Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Friday, November 30, 2012 3:19 PM To: Tomcat Users List Subject: Re: Error page messages -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Leo, On 11/30/12 5:09 PM, Leo Donahue - RDSA IT wrote: -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Friday, November 30, 2012 3:04 PM To: Tomcat Users List Subject: Re: Error page messages On 30/11/2012 21:00, Leo Donahue - RDSA IT wrote: Are there standardized server responses that one should expect to see when dealing with java.lang, javax.servlet and javax.faces exceptions that should be displayed to the client? You mean status codes or error pages? Error pages. If an exception isn't handled* by the app then it's 500 and a stacktrace if you haven't configured a custom error page. Those packages probably have a few tens of exceptions that could be thrown. I don't know that I would expect to see any of these on a public website, as I am likely not to care what happens on the server I'm browsing, as long as the server can recover/redirect. Catch them at the appropriate point in your code, or configure a custom error page. And what kind of information does one show the user in a custom error page? I don't know of any public facing websites, off hand, that show uncaught exception messages. I was just trying to decide what I would show, if anything, if I configured a custom error page for certain types of exceptions, such as java.lang, or javax.servlet, or javax.faces. How about: web.xml: error-page exception-typejava.lang.Throwable/exception-type location/WEB-INF/uncaught-error.html/location /error-page uncaught-error.html: !DOCTYPE html html headtitleError/title/head body h1Error/h1 p Aw, crap. /p /body /html Yeah, I blew off some steam playing on dev port 8080 with some fun messages just now. This whole time I thought by confusing my end users by taking them back to the web app's main page when an exception occurs was a bad idea. I really didn't want to tell them, hey, sorry but the javax.faces.View expired because you waited too long to do something productive. You can put anything in there you want, man. If the stack trace seems too ugly for you (it really is, honestly), then replace it with something else. Need some inspiration? Try Google. Or http://ux.stackexchange.com/questions/15955/how-to-create-a-useful-500- internal-server-error-page - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlC5MMQACgkQ9CaO5/Lv0PC2SwCeNW8Q8enE9m08sq9j6tYV FRX/ csoAniXbINKCbXd1ix+J9Nd3dHo0piLE =EnMx -END PGP SIGNATURE-
RE: Error page messages
-Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Friday, November 30, 2012 3:28 PM To: Tomcat Users List Subject: RE: Error page messages From: Leo Donahue - RDSA IT [mailto:leodona...@mail.maricopa.gov] Subject: RE: Error page messages I don't know of any public facing websites, off hand, that show uncaught exception messages. You need to get out more ... - Chuck +1 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error page messages
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 11/30/12 5:28 PM, Caldarale, Charles R wrote: From: Leo Donahue - RDSA IT [mailto:leodona...@mail.maricopa.gov] Subject: RE: Error page messages I don't know of any public facing websites, off hand, that show uncaught exception messages. You need to get out more - there are tons of poorly implemented websites that will splatter stack traces to the browser, especially during those odd hours when something is out for backup, maintenance, etc. My favorite ones run IIS. They give you loads of information about what really went wrong. I've even seen a site with a Perl-based (or was it PHP-based) service bombed because it couldn't connect to the database. In the error message were the credentials the script had tried to use as well as the hostname of the database, etc. Basically, a recipe book for attacks. Fail. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlC5NogACgkQ9CaO5/Lv0PD7jQCggobiKE0Vqxlt6H7QBLA5vhaT jhEAoI2E+TyHim7vd6D0/f7eJvt6rOTj =CDmP -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error page messages
Christopher Schultz wrote: ... I've even seen a site with a Perl-based (or was it PHP-based) service .. must have been PHP, not Perl, I'm sure. We Perl guys don't do things that way. As I was telling Leo off-line, we have a nice global switch called fatals_to_browser, which you can just turn on on a dev website if you want to see the stack traces, and turn off for a prod website where you don't. So when you deliver software to customers, you turn it off, and it just looks a lot better. Not that you need the feature too often either, because Perl always finds a way to interpret your code so as to do something, instead of just giving up. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error page messages
On 11/30/2012 5:59 PM, André Warnier wrote: Christopher Schultz wrote: ... I've even seen a site with a Perl-based (or was it PHP-based) service .. must have been PHP, not Perl, I'm sure. We Perl guys don't do things that way. As I was telling Leo off-line, we have a nice global switch called fatals_to_browser, which you can just turn on on a dev website if you want to see the stack traces, and turn off for a prod website where you don't. So when you deliver software to customers, you turn it off, and it just looks a lot better. Not that you need the feature too often either, because Perl always finds a way to interpret your code so as to do something, instead of That's really scary! just giving up. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: error-page for http 500 error code does not work
Chris, Through further investigation, I now believe the JSF framework I'm using is absorbing the error, and the framework's error page is what is throwing the 500 error. I wonder if the 500 error thrown by the framework's error page should fall through to the custom error page servlet I've created? The JSF framework is the Sun Visual Web Pack that is no longer supported on the Oracle Netbeans IDE. I posted on the forum for Netbeans in the hopes that someone can tell me how to disable the default exception handler for the Visual Web Pack. Thanks! - Kevin, On 6/3/2011 9:43 AM, Kevin Claver wrote: When the custom error servlet fails to display, I get the stock tomcat http 500 error page. If I look at the access log, I see the 500 error: 192.168.xxx.xxx - - [02/Jun/2011:13:53:14 -0600] POST /HMAApp/faces/main/TaskSearchTab.jsp HTTP/1.0 500 1000 So, you are sure the error happens in the requested JSP and not in the error page itself? If the error page suffers an error... it's all over. - -chris
Re: error-page for http 500 error code does not work
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kevin, On 6/7/2011 8:56 AM, Kevin Claver wrote: Through further investigation, I now believe the JSF framework I'm using is absorbing the error, and the framework's error page is what is throwing the 500 error. I wonder if the 500 error thrown by the framework's error page should fall through to the custom error page servlet I've created? As I said, if the error page suffers an error, you can't really show the error page. The JSF framework is the Sun Visual Web Pack that is no longer supported on the Oracle Netbeans IDE. I posted on the forum for Netbeans in the hopes that someone can tell me how to disable the default exception handler for the Visual Web Pack. Post back whatever you find. I'm sure it will help someone in the future (who bothers to search the archives before posting). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3ufJsACgkQ9CaO5/Lv0PCeZwCfTYuzJj9EoW8HZTy5e1/vu6Es OS8AoJxhF6MaCWg70S8fwiX1n0y+3XaI =8D34 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: error-page for http 500 error code does not work
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kevin, On 6/3/2011 9:43 AM, Kevin Claver wrote: When the custom error servlet fails to display, I get the stock tomcat http 500 error page. If I look at the access log, I see the 500 error: 192.168.xxx.xxx - - [02/Jun/2011:13:53:14 -0600] POST /HMAApp/faces/main/TaskSearchTab.jsp HTTP/1.0 500 1000 So, you are sure the error happens in the requested JSP and not in the error page itself? If the error page suffers an error... it's all over. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3s3tQACgkQ9CaO5/Lv0PBDRQCfbWW4kboAjuM/gwLUMWZlENBe ujMAoI5+nPvqUy4A+6mnaQMYHpk1gcjn =h0ce -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: error-page for http 500 error code does not work
On 02/06/2011 21:45, Kevin Claver wrote: Two things I would like to note: 1. When I invoke the Java HMAExceptionHandlerServlet configured to be used in the error-page block in the application specific web.xml directly from the URL in the browser, it works. 2. Tomcat 5.5.33 does correctly redirect to the error-page when running on a Windows 7 machine. The only time I have an issue is on the Linux configuration above. The first things I'd check is whether there's something different about your Tomcat installation on Linux. You can ZIP the whole Tomcat install (including the app(s), if they're in tomcat/webapps) and transfer the file unzip on your Linux install. Start it up see if the same thing happens. Also: what error do you see, when the custom error servlet/page fails to display? Is it the same error as you expect or a different one? - if an NPE occurs in your app, do you see a 500 + NPE stacktrace? - or if a 500 occurs, do you see a 404? p signature.asc Description: OpenPGP digital signature
Re: error-page for http 500 error code does not work
Thanks for the quick reply! I zipped the tomcat install and deployed it to my Win 7 machine where it works without issue. When the custom error servlet fails to display, I get the stock tomcat http 500 error page. If I look at the access log, I see the 500 error: 192.168.xxx.xxx - - [02/Jun/2011:13:53:14 -0600] POST /HMAApp/faces/main/TaskSearchTab.jsp HTTP/1.0 500 1000 I also see the com.sun.rave.web.ui.appbase.ApplicationException and java.lang.NullPointerException in the localhost log file (both of which are set to display the custom error page in the application specific web.xml): Jun 2, 2011 1:53:14 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet Faces Servlet threw exception com.sun.rave.web.ui.appbase.ApplicationException at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:559) at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:276) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:198) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:581) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879) 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:689) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at hmaapp.utilmanagement.OPProcMain.prerender(OPProcMain.java:2355) at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.prerender(ViewHandlerImpl.java:771) at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:268) ... 22 more - On 02/06/2011 21:45, Kevin Claver wrote: Two things I would like to note: =20 1. When I invoke the Java HMAExceptionHandlerServlet configured to be = used in the error-page block in the application specific web.xml directly= from the URL in the browser, it works. =20 2. Tomcat 5.5.33 does correctly redirect to the error-page when runnin= g on a Windows 7 machine. The only time I have an issue is on the Linux = configuration above. The first things I'd check is whether there's something different about your Tomcat installation on Linux. You can ZIP the whole Tomcat install (including the app(s), if they're in tomcat/webapps) and transfer the file unzip on your Linux install. Start it up see if the same thing happens. Also: what error do you see, when the custom error servlet/page fails to display? Is it the same error as you expect or a different one? - if an NPE occurs in your app, do you see a 500 + NPE stacktrace? - or if a 500 occurs, do you see a 404? p
RE: error-page for http 500 error code does not work
From: Kevin Claver [mailto:kcla...@yahoo.com] Subject: Re: error-page for http 500 error code does not work I zipped the tomcat install and deployed it to my Win 7 machine where it works without issue. I'll hazard a guess that you have a case sensitivity issue. Something in your configuration specifies the wrong case for who knows what (perhaps a file name), or a file is installed with the wrong casing. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: error-page for http 500 error code does not work
Thanks Charles, however, I did try to change the error code for the custom error servlet to 404 and it works on the Linux install. It's only an issue if I try to trap the 500 error. From: Caldarale, Charles R chuck.caldar...@unisys.com To: Tomcat Users List users@tomcat.apache.org Sent: Friday, June 3, 2011 7:47 AM Subject: RE: error-page for http 500 error code does not work From: Kevin Claver [mailto:kcla...@yahoo.com] Subject: Re: error-page for http 500 error code does not work I zipped the tomcat install and deployed it to my Win 7 machine where it works without issue. I'll hazard a guess that you have a case sensitivity issue. Something in your configuration specifies the wrong case for who knows what (perhaps a file name), or a file is installed with the wrong casing. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: error-page exception-type subclasses of RuntimeException are not handled
I am not too sure on this, but it could be because runtime exceptions are usually avoidable and perhaps therefore you need to deal with such errors beforehand(higher up in the stack) and throw custom exceptions. It doesn't sound like good coding standards(what you are doing anyway). If you are using JSF you can usefrom-outcome to control views for user error to redirect them to error page. -- From: bryan jacobs bryancjac...@hotmail.com Sent: Wednesday, May 12, 2010 12:56 AM To: users@tomcat.apache.org Subject: error-page exception-type subclasses of RuntimeException are not handled Tomcat Version: apache-tomcat-6.0.26 JDK: jdk1.6.0_19 OS: Windows XP Service Pack 2 I am using the page-error element in my web.xml with the exception-type element which contains a subclass of RuntimeException. When I subclass RuntimeException the location element which specifies my error-page to land on in the event that exception is raised is not displayed. web.xml snippet: error-page exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type location/error.html/location /error-page Where LuaSecurityException extends RuntimeException When my JAX-RS method throws the LuaSecurityException the error.html is NOT displayed. However, if I change the above configuration to: error-page exception-typejava.lang.RuntimeException/exception-type location/error.html/location /error-page and have my class throw a RuntimeException then the error.html page is displayed. Finally if I change the web.xml to: error-page exception-typejava.lang.Exception/exception-type location/error.html/location /error-page and my jax-rs class throws a LuaSecurityException extends RuntimeException then my error.html is displayed. What I would like to do is: error-page exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type location/error.html/location /error-page That way I can create various RuntimeException subclasses which are appropriate for my application and handle them with specific error pages. Any help would be appreciated. If you need more information please let me know. Bryan _ Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: error-page exception-type subclasses of RuntimeException are not handled
I thought I would like to add to thepoint I am trying to make, I am using hibernate validation API and get big fat runtime exceptions if the validation API fails a check on a field that has certain validations like length etc. These excceptions are avoidable (some of them) from the point that the data is entered snd I can ask user for correct data (or more reasonable data) Lets say I have an email field in UserEntity as follows @Email public String getUserEmail() { return userEmail; } It is the job of the business layer to 1 decide on valid emails (like we only accept hotmail) if such logic applies) and it is the job of the view to find incorrect emails as soon as possible to avoid an expensive rountrip for the sake of a user using the application. -- From: Yucca Nel yucca...@live.co.za Sent: Wednesday, May 12, 2010 9:03 AM To: Tomcat Users List users@tomcat.apache.org Subject: Re: error-page exception-type subclasses of RuntimeException are not handled I am not too sure on this, but it could be because runtime exceptions are usually avoidable and perhaps therefore you need to deal with such errors beforehand(higher up in the stack) and throw custom exceptions. It doesn't sound like good coding standards(what you are doing anyway). If you are using JSF you can usefrom-outcome to control views for user error to redirect them to error page. -- From: bryan jacobs bryancjac...@hotmail.com Sent: Wednesday, May 12, 2010 12:56 AM To: users@tomcat.apache.org Subject: error-page exception-type subclasses of RuntimeException are not handled Tomcat Version: apache-tomcat-6.0.26 JDK: jdk1.6.0_19 OS: Windows XP Service Pack 2 I am using the page-error element in my web.xml with the exception-type element which contains a subclass of RuntimeException. When I subclass RuntimeException the location element which specifies my error-page to land on in the event that exception is raised is not displayed. web.xml snippet: error-page exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type location/error.html/location /error-page Where LuaSecurityException extends RuntimeException When my JAX-RS method throws the LuaSecurityException the error.html is NOT displayed. However, if I change the above configuration to: error-page exception-typejava.lang.RuntimeException/exception-type location/error.html/location /error-page and have my class throw a RuntimeException then the error.html page is displayed. Finally if I change the web.xml to: error-page exception-typejava.lang.Exception/exception-type location/error.html/location /error-page and my jax-rs class throws a LuaSecurityException extends RuntimeException then my error.html is displayed. What I would like to do is: error-page exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type location/error.html/location /error-page That way I can create various RuntimeException subclasses which are appropriate for my application and handle them with specific error pages. Any help would be appreciated. If you need more information please let me know. Bryan _ Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2 - 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: error-page exception-type subclasses of RuntimeException are not handled
While not using a framework like Hibernate, I recall coding for an exception in the servlet itself. Then throwing an exception to get to the error page. Not sure if that helps you or not. -Original Message- From: Yucca Nel [mailto:yucca...@live.co.za] Sent: Wednesday, May 12, 2010 2:15 AM To: Tomcat Users List Subject: Re: error-page exception-type subclasses of RuntimeException are not handled I thought I would like to add to thepoint I am trying to make, I am using hibernate validation API and get big fat runtime exceptions if the validation API fails a check on a field that has certain validations like length etc. These excceptions are avoidable (some of them) from the point that the data is entered snd I can ask user for correct data (or more reasonable data) Lets say I have an email field in UserEntity as follows @Email public String getUserEmail() { return userEmail; } It is the job of the business layer to 1 decide on valid emails (like we only accept hotmail) if such logic applies) and it is the job of the view to find incorrect emails as soon as possible to avoid an expensive rountrip for the sake of a user using the application. -- From: Yucca Nel yucca...@live.co.za Sent: Wednesday, May 12, 2010 9:03 AM To: Tomcat Users List users@tomcat.apache.org Subject: Re: error-page exception-type subclasses of RuntimeException are not handled I am not too sure on this, but it could be because runtime exceptions are usually avoidable and perhaps therefore you need to deal with such errors beforehand(higher up in the stack) and throw custom exceptions. It doesn't sound like good coding standards(what you are doing anyway). If you are using JSF you can usefrom-outcome to control views for user error to redirect them to error page. -- From: bryan jacobs bryancjac...@hotmail.com Sent: Wednesday, May 12, 2010 12:56 AM To: users@tomcat.apache.org Subject: error-page exception-type subclasses of RuntimeException are not handled Tomcat Version: apache-tomcat-6.0.26 JDK: jdk1.6.0_19 OS: Windows XP Service Pack 2 I am using the page-error element in my web.xml with the exception-type element which contains a subclass of RuntimeException. When I subclass RuntimeException the location element which specifies my error-page to land on in the event that exception is raised is not displayed. web.xml snippet: error-page exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type location/error.html/location /error-page Where LuaSecurityException extends RuntimeException When my JAX-RS method throws the LuaSecurityException the error.html is NOT displayed. However, if I change the above configuration to: error-page exception-typejava.lang.RuntimeException/exception-type location/error.html/location /error-page and have my class throw a RuntimeException then the error.html page is displayed. Finally if I change the web.xml to: error-page exception-typejava.lang.Exception/exception-type location/error.html/location /error-page and my jax-rs class throws a LuaSecurityException extends RuntimeException then my error.html is displayed. What I would like to do is: error-page exception-typeorg.lds.lua.directory.exception.LuaSecurityException /exception-type location/error.html/location /error-page That way I can create various RuntimeException subclasses which are appropriate for my application and handle them with specific error pages. Any help would be appreciated. If you need more information please let me know. Bryan _ Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTA GL:ON:WL:en-US:WM_HMP:042010_2 - 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...@tomcat.apache.org
RE: error-page exception-type subclasses of RuntimeException are not handled
I don't have any web framework. I'm using JQuery with JAX-RS. So jquery posts/gets from the JAX-RS layer. The SecurityException is related to a person trying to hack the system. Thus, when they perform their attempted hack the code simply throws a SecurityException, and takes them to a, we know what you are trying to do page. To me it seems reasonable. All other exceptions are handled in the code as one would expect. Generally, a RuntimeException is used when recovery is not possible. That is the case here, and why a RuntimeException has been thrown. However, I will try creating a checked Exception subclass and see if that fixes the problem. Thanks for the response. Bryan From: yucca...@live.co.za To: users@tomcat.apache.org Subject: Re: error-page exception-type subclasses of RuntimeException are not handled Date: Wed, 12 May 2010 09:03:30 +0200 I am not too sure on this, but it could be because runtime exceptions are usually avoidable and perhaps therefore you need to deal with such errors beforehand(higher up in the stack) and throw custom exceptions. It doesn't sound like good coding standards(what you are doing anyway). If you are using JSF you can usefrom-outcome to control views for user error to redirect them to error page. -- From: bryan jacobs bryancjac...@hotmail.com Sent: Wednesday, May 12, 2010 12:56 AM To: users@tomcat.apache.org Subject: error-page exception-type subclasses of RuntimeException are not handled Tomcat Version: apache-tomcat-6.0.26 JDK: jdk1.6.0_19 OS: Windows XP Service Pack 2 I am using the page-error element in my web.xml with the exception-type element which contains a subclass of RuntimeException. When I subclass RuntimeException the location element which specifies my error-page to land on in the event that exception is raised is not displayed. web.xml snippet: error-page exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type location/error.html/location /error-page Where LuaSecurityException extends RuntimeException When my JAX-RS method throws the LuaSecurityException the error.html is NOT displayed. However, if I change the above configuration to: error-page exception-typejava.lang.RuntimeException/exception-type location/error.html/location /error-page and have my class throw a RuntimeException then the error.html page is displayed. Finally if I change the web.xml to: error-page exception-typejava.lang.Exception/exception-type location/error.html/location /error-page and my jax-rs class throws a LuaSecurityException extends RuntimeException then my error.html is displayed. What I would like to do is: error-page exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type location/error.html/location /error-page That way I can create various RuntimeException subclasses which are appropriate for my application and handle them with specific error pages. Any help would be appreciated. If you need more information please let me know. Bryan _ Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ The New Busy is not the old busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3
Re: error-page exception-type subclasses of RuntimeException are not handled
2010/5/12 bryan jacobs bryancjac...@hotmail.com: error-page exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type location/error.html/location /error-page However, if I change the above configuration to: error-page exception-typejava.lang.RuntimeException/exception-type location/error.html/location /error-page and have my class throw a RuntimeException then the error.html page is displayed. Can you prepare a simple war file (including source code), that reproduces this issue, and file a bug report? The place where exception handling is implemented is org.apache.catalina.core.StandardHostValve The exception is processed by #throwable(..) method there and the error page is found by #findErrorPage(context, throwable). I do not see where that code can go wrong. It might be though that you have a misprint in your exception class name in web.xml. The code does not check that the mentioned exception class exists. It just compares strings: the name of the exception class and the name configured in web.xml. Also, on an error page you should be able to access the exception as request.getAttribute(javax.servlet.error.exception) see SRV.9.9.1 so you will be able to see what is actually caught by Tomcat. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: error-page exception-type subclasses of RuntimeException are not handled
Thanks for that information. I will do some research based on that. Bryan Date: Wed, 12 May 2010 19:50:16 +0400 Subject: Re: error-page exception-type subclasses of RuntimeException are not handled From: knst.koli...@gmail.com To: users@tomcat.apache.org 2010/5/12 bryan jacobs bryancjac...@hotmail.com: error-page exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type location/error.html/location /error-page However, if I change the above configuration to: error-page exception-typejava.lang.RuntimeException/exception-type location/error.html/location /error-page and have my class throw a RuntimeException then the error.html page is displayed. Can you prepare a simple war file (including source code), that reproduces this issue, and file a bug report? The place where exception handling is implemented is org.apache.catalina.core.StandardHostValve The exception is processed by #throwable(..) method there and the error page is found by #findErrorPage(context, throwable). I do not see where that code can go wrong. It might be though that you have a misprint in your exception class name in web.xml. The code does not check that the mentioned exception class exists. It just compares strings: the name of the exception class and the name configured in web.xml. Also, on an error page you should be able to access the exception as request.getAttribute(javax.servlet.error.exception) see SRV.9.9.1 so you will be able to see what is actually caught by Tomcat. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail. http://www.windowslive.com/campaign/thenewbusy?tile=multiaccountocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4
RE: error-page exception-type subclasses of RuntimeException are not handled
In the process of putting together the simple war file without all our CXF and JAX-RS configuration the exception-type element was handling exceptions correctly. This is NOT a bug in tomcat, but something that our CXF layer is doing. Thanks for the help, and sorry for wasting your time. Bryan Date: Wed, 12 May 2010 19:50:16 +0400 Subject: Re: error-page exception-type subclasses of RuntimeException are not handled From: knst.koli...@gmail.com To: users@tomcat.apache.org 2010/5/12 bryan jacobs bryancjac...@hotmail.com: error-page exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type location/error.html/location /error-page However, if I change the above configuration to: error-page exception-typejava.lang.RuntimeException/exception-type location/error.html/location /error-page and have my class throw a RuntimeException then the error.html page is displayed. Can you prepare a simple war file (including source code), that reproduces this issue, and file a bug report? The place where exception handling is implemented is org.apache.catalina.core.StandardHostValve The exception is processed by #throwable(..) method there and the error page is found by #findErrorPage(context, throwable). I do not see where that code can go wrong. It might be though that you have a misprint in your exception class name in web.xml. The code does not check that the mentioned exception class exists. It just compares strings: the name of the exception class and the name configured in web.xml. Also, on an error page you should be able to access the exception as request.getAttribute(javax.servlet.error.exception) see SRV.9.9.1 so you will be able to see what is actually caught by Tomcat. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ The New Busy is not the old busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3
Re: error-page problem - nested exceptions
Thanks Len. -- View this message in context: http://old.nabble.com/error-page-problem---nested-exceptions-tp27272261p27294864.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: error-page problem - nested exceptions
You could have your error handler check if the exception is a NestedServletException and its getRootCause() is a UnAuthorisedAccessException, and display the nested exception's error message in that case. You might want to use a separate error-page for NestedServletException. -- Len On Fri, Jan 22, 2010 at 07:06, rotis23 roti...@yahoo.com wrote: Hi All, I use web.xml error-page handlers, some with error-code and other with exception-type. At the end I have a catchall error-page that handles java.lang.Throwable - users never see a stack trace and the world is a good place. However, I've recently added a Hibernate security layer that throws a UnAuthorisedAccessException that gets wrapped in a Spring NestedServletException before it hits the error-page handlers. Now I understand that it tries to match the top level Exception in the stack first then uses the next nested exception after that and so on until an error-page is matched. The problem is that my catchall Throwable is matching the NestedServletException first before the wrapped UnAuthorisedAccessException hits its error-page handler. I need the users to see that they don't have the privleges rather than a generic error messge - I also need the catchall! Has anyone else dealt with this issue? I've been searchign for a couple days on this now. TIA, rotis23 -- View this message in context: http://old.nabble.com/error-page-problem---nested-exceptions-tp27272261p27272261.html Sent from the Tomcat - User mailing list archive at Nabble.com. - 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: error-page problem - nested exceptions
Hi Len, Thanks for your message. I don't have my 'own' error handler - I just use the error-page elements in web.xml. If I add an error-page for NestedServletException will the exception be available to the corresponding jsp [in the request]? Has anyone extended tomcats error-page implementation to find nested exceptions? Cheers, rotis23 -- View this message in context: http://old.nabble.com/error-page-problem---nested-exceptions-tp27272261p27276806.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: error-page problem - nested exceptions
Yes, in the error page you can get the exception as a request attribute, either javax.servlet.jsp.jspException or javax.servlet.error.exception (sometimes it's one, sometimes the other). In my app, I found that this exception has already been unwrapped - it's the original exception, not a ServletException. I'm not sure it works the same way with Spring's NestedServletException - you'll have to try it out. -- Len On Fri, Jan 22, 2010 at 12:15, rotis23 roti...@yahoo.com wrote: Hi Len, Thanks for your message. I don't have my 'own' error handler - I just use the error-page elements in web.xml. If I add an error-page for NestedServletException will the exception be available to the corresponding jsp [in the request]? Has anyone extended tomcats error-page implementation to find nested exceptions? Cheers, rotis23 -- View this message in context: http://old.nabble.com/error-page-problem---nested-exceptions-tp27272261p27276806.html Sent from the Tomcat - User mailing list archive at Nabble.com. - 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: error page configuration
This is not a Tomcat-related question but a question relating to Servlets in general. http://edocs.bea.com/wls/docs61/webapp/web_xml.html#1017571 Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: error page configuration
You may also want to try asking on the Tiles User list: us...@tiles.apache.org On Mar 19, 2009, at 7:54 AM, Gregor Schneider wrote: This is not a Tomcat-related question but a question relating to Servlets in general. http://edocs.bea.com/wls/docs61/webapp/web_xml.html#1017571 Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - 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: error page configuration
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dinesh, On 3/19/2009 12:20 AM, Dinesh Gupta wrote: In my application, using tiles at the run time from the database we pick the the jsp file. But some times exception occurred.So that if any include page got exception I want to go to the error page. In my case blank page comes or some time header displayed body part is blank. It's possible that, by the time the error occurs, the response has already been committed, so the error page can't be shown. Try increasing the buffer size on a sample page (in JSP, you do this in the %...@page ... % declaration to see if that helps. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknCXnIACgkQ9CaO5/Lv0PDoxACff15terejF+u8umP1KEPHoUVg YD8An3dHk2AnlUds/6sRylO2RhwQHa+Q =7qHg -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: error page configuration
From: Dinesh Gupta [mailto:dinesh.gupt...@hotmail.com] Subject: error page configuration If anyone have idea about this please help. http://www.catb.org/~esr/faqs/smart-questions.html If you provide real information, you might get a real answer... - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: error page configuration
Hi, In my application, using tiles at the run time from the database we pick the the jsp file. But some times exception occurred.So that if any include page got exception I want to go to the error page. In my case blank page comes or some time header displayed body part is blank. Now My question is that Can we handle the included page error by using filter,coz I don't use in each page isErrorPage tag. Regards, Dinesh Gupta From: chuck.caldar...@unisys.com To: users@tomcat.apache.org Date: Wed, 18 Mar 2009 08:52:21 -0500 Subject: RE: error page configuration From: Dinesh Gupta [mailto:dinesh.gupt...@hotmail.com] Subject: error page configuration If anyone have idea about this please help. http://www.catb.org/~esr/faqs/smart-questions.html If you provide real information, you might get a real answer... - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ The new Windows Live Messenger. You don’t want to miss this. http://www.microsoft.com/india/windows/windowslive/messenger.aspx
Re: Error Page Question
oh no! even more work for me now... thanks anyway for your help guys! Len Popp wrote: You can't override the 503 error page using an error-page declaration. :-( The only way I know of to change it is to replace org.apache.catalina.valves.ErrorReportValve with your own version, which you specify in the errorReportValveClass attribute of the Host element in server.xml. I haven't tried this, but it's documented for Tomcat 5.5 and 6.0. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error Page Question
The easiest way i found out here was to use the 404 of the ROOT web application ^^ to display a 'site under maintenance'. You could also create a ROOT/webappname/index.html to get same result En l'instant précis du 19/03/08 11:55, Peter Stavrinides s'exprimait en ces termes: Hi all, How do I display a friendly error page (503 site under maintenance) if my application is taken off-line? I understand how to override error pages with my application running, but can I, and where do I configure a 503 when its down, but Tomcat is still running. Thanks Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.devlog.be (a belgian developer's logs) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error Page Question
Oh thanks! that sounds quite simple... so I just add my error page descriptor in the ROOT applications web.xml and it will override. David Delbecq wrote: The easiest way i found out here was to use the 404 of the ROOT web application ^^ to display a 'site under maintenance'. You could also create a ROOT/webappname/index.html to get same result En l'instant précis du 19/03/08 11:55, Peter Stavrinides s'exprimait en ces termes: Hi all, How do I display a friendly error page (503 site under maintenance) if my application is taken off-line? I understand how to override error pages with my application running, but can I, and where do I configure a 503 when its down, but Tomcat is still running. Thanks Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error Page Question
Unfortunately this solution doesn't solve it, I can only override 404 pages?, for 503 pages it simply ignores the override in web.xml, anybody got any other suggestions? Peter Stavrinides wrote: Oh thanks! that sounds quite simple... so I just add my error page descriptor in the ROOT applications web.xml and it will override. David Delbecq wrote: The easiest way i found out here was to use the 404 of the ROOT web application ^^ to display a 'site under maintenance'. You could also create a ROOT/webappname/index.html to get same result En l'instant précis du 19/03/08 11:55, Peter Stavrinides s'exprimait en ces termes: Hi all, How do I display a friendly error page (503 site under maintenance) if my application is taken off-line? I understand how to override error pages with my application running, but can I, and where do I configure a 503 when its down, but Tomcat is still running. Thanks Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error Page Question
Peter Stavrinides wrote: Unfortunately this solution doesn't solve it, I can only override 404 pages?, for 503 pages it simply ignores the override in web.xml, anybody got any other suggestions? I thought used to be possible to customise the built in error pages with XSL, but I can't seem to find any evidence of that in 6.x. You *might* be able to write a Valve (configured in server.xml, under the Host) that acts early enough in the request / response cycle to return a different page, but I am in fact speculating wildly. The org.apache.catalina.valves.ErrorReportValve uses a StringBuilder to create HTML and sends it to a Writer, which might make things difficult. Valves aren't too tricky to write so it would be easy/quick to experiment and see if it works. p Peter Stavrinides wrote: Oh thanks! that sounds quite simple... so I just add my error page descriptor in the ROOT applications web.xml and it will override. David Delbecq wrote: The easiest way i found out here was to use the 404 of the ROOT web application ^^ to display a 'site under maintenance'. You could also create a ROOT/webappname/index.html to get same result En l'instant précis du 19/03/08 11:55, Peter Stavrinides s'exprimait en ces termes: Hi all, How do I display a friendly error page (503 site under maintenance) if my application is taken off-line? I understand how to override error pages with my application running, but can I, and where do I configure a 503 when its down, but Tomcat is still running. Thanks Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error Page Question
You can't override the 503 error page using an error-page declaration. :-( The only way I know of to change it is to replace org.apache.catalina.valves.ErrorReportValve with your own version, which you specify in the errorReportValveClass attribute of the Host element in server.xml. I haven't tried this, but it's documented for Tomcat 5.5 and 6.0. -- Len On Wed, Mar 19, 2008 at 10:36 AM, Peter Stavrinides [EMAIL PROTECTED] wrote: Unfortunately this solution doesn't solve it, I can only override 404 pages?, for 503 pages it simply ignores the override in web.xml, anybody got any other suggestions? Peter Stavrinides wrote: Oh thanks! that sounds quite simple... so I just add my error page descriptor in the ROOT applications web.xml and it will override. David Delbecq wrote: The easiest way i found out here was to use the 404 of the ROOT web application ^^ to display a 'site under maintenance'. You could also create a ROOT/webappname/index.html to get same result En l'instant précis du 19/03/08 11:55, Peter Stavrinides s'exprimait en ces termes: Hi all, How do I display a friendly error page (503 site under maintenance) if my application is taken off-line? I understand how to override error pages with my application running, but can I, and where do I configure a 503 when its down, but Tomcat is still running. Thanks Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error-page directive not working
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Neil, Neil Aggarwal wrote: When I load that url, I get an error in the tomcat log but the error page does not come up on the browser. What /do/ you get in the browser? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG5Wpj9CaO5/Lv0PARAsmqAKC3OsjqQCNf3a4456WzdiOvIi46EACfSEUV atC4Bo3Y4PAZR2EWs5HeyR4= =YEHG -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error Page problems
From: ryoung5367 [mailto:[EMAIL PROTECTED] Subject: Error Page problems I noticed that I no longer get the standard Tomcat message on 404's, but I get a 404 error in the browser. Are you using Internet Explorer? If so, it won't display short error pages for known errors. Try the same page with Firefox and see if it works. If it does, then either turn off Show friendly [sic] HTTP error messages in IE's Tools - Options - Advanced tab, or make your custom error page longer by adding spaces, dummy paragraphs, or ASCII art. (Sorry, I don't remember the threshold size.) - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error-page not working
SiSi'mon a écrit : I have the following: error-page exception-typejava.lang.Throwable/exception-type location/web/error/Throwable.jsf/location /error-page but there are myfaces / spring and hibernate exceptions being thrown and it is not being sent to this xhtml page. any ideas? All exceptions that get out of the Servlet that handled a request are redirected to error page by container. However, there is one case, i encountered it using struts tiles, where an exception make it out of servlet but does not reach client screen. It's when servlet already started to flush response to client. At this time it's impossible to send an error page. However, exception does anyway reach the logs. So, for jsf, if your exception occurs in render response face, no way to get it on screen with basic configuration. One way around this is to prevent servlet from sending response to client until it wrote all response to a buffer. You can, for example, add a servlet filter that wrapps the responseWriter to a byteArrayOutputStream. This way, only when servlet returned properly from process you send response to client. But this buffering has a price, if response is 600K you need 600K ram during request. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: error-page not working
Is it possible you're running into any of : http://issues.apache.org/bugzilla/show_bug.cgi?id=42434 http://issues.apache.org/bugzilla/show_bug.cgi?id=37062#c4 http://issues.apache.org/bugzilla/show_bug.cgi?id=40135 -Original Message- From: David Delbecq [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 23, 2007 3:26 PM To: Tomcat Users List Subject: Re: error-page not working SiSi'mon a écrit : I have the following: error-page exception-typejava.lang.Throwable/exception-type location/web/error/Throwable.jsf/location /error-page but there are myfaces / spring and hibernate exceptions being thrown and it is not being sent to this xhtml page. any ideas? All exceptions that get out of the Servlet that handled a request are redirected to error page by container. However, there is one case, i encountered it using struts tiles, where an exception make it out of servlet but does not reach client screen. It's when servlet already started to flush response to client. At this time it's impossible to send an error page. However, exception does anyway reach the logs. So, for jsf, if your exception occurs in render response face, no way to get it on screen with basic configuration. One way around this is to prevent servlet from sending response to client until it wrote all response to a buffer. You can, for example, add a servlet filter that wrapps the responseWriter to a byteArrayOutputStream. This way, only when servlet returned properly from process you send response to client. But this buffering has a price, if response is 600K you need 600K ram during request. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: error-page and TC 5.5.23
Is this just a boring question, or has no-one else run into the problem? -Original Message- From: gb1071nx [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 08, 2007 2:22 PM To: Tomcat Users List Subject: RE: error-page and TC 5.5.23 I'm just adding to this: When I remove the mapping for the error-code 500, then I get the standard tc5.5 error page. So my exception-type error-page directive is being ignored. So it does appear that http://issues.apache.org/bugzilla/show_bug.cgi?id=37062#c4 isn't fixed. And won't be fixed? It occurs to me that this should break quite a few working apps though, so surely someone else has reported it? Searching further, I found this: http://issues.apache.org/bugzilla/show_bug.cgi?id=40135 Is it then now a requirement that for JSP's, we *must* use the errorPage directive? Or is there a way to get the more generic web.xml error-page config to work? And can anyone explain what is meant by development mode (from comment in bug 37062 and how to switch it off (to see if that makes my error-page's work again) -Original Message- From: gb1071nx [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 08, 2007 12:39 PM To: Tomcat Users List Subject: error-page and TC 5.5.23 Hello, I'm starting the process of migrating some of our server from 5.0.29 to 5.5.23, and I've found that the 'nice' useful stacktraces with linenumbers are back, and working beautifully in 5.5.23. But I do find the following issues as well: I have the following test page: html body % if (true) { throw new java.sql.SQLException(TEST); } % /body /html And the following web.xml: ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 error-page exception-typejava.sql.SQLException/exception-type location/error/database.jsp/location /error-page error-page error-code500/error-code location/error/500.jsp/location /error-page /web-app And when I call the page throwing the SQLException, I get the error page for the error-code 500. Tomcat5.0 does not behave like that, 5.5 does. Which is the correct behaviour? (or perhaps: is there a way to configure 5.5 so that it acts like 5.0?) I recall this bug report: http://issues.apache.org/bugzilla/show_bug.cgi?id=37062#c4 . Has the bug reported in comment#4 been fixed? Is this the bug I'm experiencing in my test page? Also, I can confirm the following bug, I also experience it: http://issues.apache.org/bugzilla/show_bug.cgi?id=42314 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error-page and TC 5.5.23
Reading the comments on the bug issue you cited, it looks like it's fixed, but with side effects -- namely the exception traps aren't available any more. What do you want anyone to say here? --David gb1071nx wrote: Is this just a boring question, or has no-one else run into the problem? -Original Message- From: gb1071nx [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 08, 2007 2:22 PM To: Tomcat Users List Subject: RE: error-page and TC 5.5.23 I'm just adding to this: When I remove the mapping for the error-code 500, then I get the standard tc5.5 error page. So my exception-type error-page directive is being ignored. So it does appear that http://issues.apache.org/bugzilla/show_bug.cgi?id=37062#c4 isn't fixed. And won't be fixed? It occurs to me that this should break quite a few working apps though, so surely someone else has reported it? Searching further, I found this: http://issues.apache.org/bugzilla/show_bug.cgi?id=40135 Is it then now a requirement that for JSP's, we *must* use the errorPage directive? Or is there a way to get the more generic web.xml error-page config to work? And can anyone explain what is meant by development mode (from comment in bug 37062 and how to switch it off (to see if that makes my error-page's work again) -Original Message- From: gb1071nx [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 08, 2007 12:39 PM To: Tomcat Users List Subject: error-page and TC 5.5.23 Hello, I'm starting the process of migrating some of our server from 5.0.29 to 5.5.23, and I've found that the 'nice' useful stacktraces with linenumbers are back, and working beautifully in 5.5.23. But I do find the following issues as well: I have the following test page: html body % if (true) { throw new java.sql.SQLException(TEST); } % /body /html And the following web.xml: ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 error-page exception-typejava.sql.SQLException/exception-type location/error/database.jsp/location /error-page error-page error-code500/error-code location/error/500.jsp/location /error-page /web-app And when I call the page throwing the SQLException, I get the error page for the error-code 500. Tomcat5.0 does not behave like that, 5.5 does. Which is the correct behaviour? (or perhaps: is there a way to configure 5.5 so that it acts like 5.0?) I recall this bug report: http://issues.apache.org/bugzilla/show_bug.cgi?id=37062#c4 . Has the bug reported in comment#4 been fixed? Is this the bug I'm experiencing in my test page? Also, I can confirm the following bug, I also experience it: http://issues.apache.org/bugzilla/show_bug.cgi?id=42314 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: error-page and TC 5.5.23
I was under the impression that the exception traps are part of the spec, somewhere in srv.9.9. I expect someone here to say: yes, it's part of the spec that we broke in TC 5.5, and we'll fix it or : that's not part of the spec, so who cares that it doesn't work or: part of the spec, but who cares. I just want a response from someone with the power to fix it, that it will be fixed (or not). -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, May 10, 2007 10:20 AM To: Tomcat Users List Subject: Re: error-page and TC 5.5.23 Reading the comments on the bug issue you cited, it looks like it's fixed, but with side effects -- namely the exception traps aren't available any more. What do you want anyone to say here? --David gb1071nx wrote: Is this just a boring question, or has no-one else run into the problem? -Original Message- From: gb1071nx [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 08, 2007 2:22 PM To: Tomcat Users List Subject: RE: error-page and TC 5.5.23 I'm just adding to this: When I remove the mapping for the error-code 500, then I get the standard tc5.5 error page. So my exception-type error-page directive is being ignored. So it does appear that http://issues.apache.org/bugzilla/show_bug.cgi?id=37062#c4 isn't fixed. And won't be fixed? It occurs to me that this should break quite a few working apps though, so surely someone else has reported it? Searching further, I found this: http://issues.apache.org/bugzilla/show_bug.cgi?id=40135 Is it then now a requirement that for JSP's, we *must* use the errorPage directive? Or is there a way to get the more generic web.xml error-page config to work? And can anyone explain what is meant by development mode (from comment in bug 37062 and how to switch it off (to see if that makes my error-page's work again) -Original Message- From: gb1071nx [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 08, 2007 12:39 PM To: Tomcat Users List Subject: error-page and TC 5.5.23 Hello, I'm starting the process of migrating some of our server from 5.0.29 to 5.5.23, and I've found that the 'nice' useful stacktraces with linenumbers are back, and working beautifully in 5.5.23. But I do find the following issues as well: I have the following test page: html body % if (true) { throw new java.sql.SQLException(TEST); } % /body /html And the following web.xml: ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 error-page exception-typejava.sql.SQLException/exception-type location/error/database.jsp/location /error-page error-page error-code500/error-code location/error/500.jsp/location /error-page /web-app And when I call the page throwing the SQLException, I get the error page for the error-code 500. Tomcat5.0 does not behave like that, 5.5 does. Which is the correct behaviour? (or perhaps: is there a way to configure 5.5 so that it acts like 5.0?) I recall this bug report: http://issues.apache.org/bugzilla/show_bug.cgi?id=37062#c4 . Has the bug reported in comment#4 been fixed? Is this the bug I'm experiencing in my test page? Also, I can confirm the following bug, I also experience it: http://issues.apache.org/bugzilla/show_bug.cgi?id=42314 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: error-page and TC 5.5.23
I don't like bothering the dev list with things that I'm not 100% sure are 'real' problems. Same with buzilla; why commit the ultimate affrontery of entering a bugzilla report, just so someone can close it with a snipe and an INVALID. And I just can't believe that after all this time, I'm the first person to 'discover' this bug. That's why I was asking around here first. But, perhaps you have enboldened me. ;) -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, May 10, 2007 10:41 AM To: Tomcat Users List Subject: Re: error-page and TC 5.5.23 I know there are committers reading this list, but you might want to ping this question off the dev list. You could also search for a follow up issue in bugzilla to address the new problem. If one doesn't exist, go ahead and submit one. --David gb1071nx wrote: I was under the impression that the exception traps are part of the spec, somewhere in srv.9.9. I expect someone here to say: yes, it's part of the spec that we broke in TC 5.5, and we'll fix it or : that's not part of the spec, so who cares that it doesn't work or: part of the spec, but who cares. I just want a response from someone with the power to fix it, that it will be fixed (or not). -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, May 10, 2007 10:20 AM To: Tomcat Users List Subject: Re: error-page and TC 5.5.23 Reading the comments on the bug issue you cited, it looks like it's fixed, but with side effects -- namely the exception traps aren't available any more. What do you want anyone to say here? --David gb1071nx wrote: Is this just a boring question, or has no-one else run into the problem? -Original Message- From: gb1071nx [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 08, 2007 2:22 PM To: Tomcat Users List Subject: RE: error-page and TC 5.5.23 I'm just adding to this: When I remove the mapping for the error-code 500, then I get the standard tc5.5 error page. So my exception-type error-page directive is being ignored. So it does appear that http://issues.apache.org/bugzilla/show_bug.cgi?id=37062#c4 isn't fixed. And won't be fixed? It occurs to me that this should break quite a few working apps though, so surely someone else has reported it? Searching further, I found this: http://issues.apache.org/bugzilla/show_bug.cgi?id=40135 Is it then now a requirement that for JSP's, we *must* use the errorPage directive? Or is there a way to get the more generic web.xml error-page config to work? And can anyone explain what is meant by development mode (from comment in bug 37062 and how to switch it off (to see if that makes my error-page's work again) -Original Message- From: gb1071nx [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 08, 2007 12:39 PM To: Tomcat Users List Subject: error-page and TC 5.5.23 Hello, I'm starting the process of migrating some of our server from 5.0.29 to 5.5.23, and I've found that the 'nice' useful stacktraces with linenumbers are back, and working beautifully in 5.5.23. But I do find the following issues as well: I have the following test page: html body % if (true) { throw new java.sql.SQLException(TEST); } % /body /html And the following web.xml: ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 error-page exception-typejava.sql.SQLException/exception-type location/error/database.jsp/location /error-page error-page error-code500/error-code location/error/500.jsp/location /error-page /web-app And when I call the page throwing the SQLException, I get the error page for the error-code 500. Tomcat5.0 does not behave like that, 5.5 does. Which is the correct behaviour? (or perhaps: is there a way to configure 5.5 so that it acts like 5.0?) I recall this bug report: http://issues.apache.org/bugzilla/show_bug.cgi?id=37062#c4 . Has the bug reported in comment#4 been fixed? Is this the bug I'm experiencing in my test page? Also, I can confirm the following bug, I also experience it: http://issues.apache.org/bugzilla/show_bug.cgi?id=42314 --- -- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users
Re: error-page and TC 5.5.23
That's why I suggested searching bugzilla before opening a bug report. I doubt though that it'll get marked off as INVALID if it's in the spec and you can provide a simple war file demonstrating the problem. --David gb1071nx wrote: I don't like bothering the dev list with things that I'm not 100% sure are 'real' problems. Same with buzilla; why commit the ultimate affrontery of entering a bugzilla report, just so someone can close it with a snipe and an INVALID. And I just can't believe that after all this time, I'm the first person to 'discover' this bug. That's why I was asking around here first. But, perhaps you have enboldened me. ;) -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, May 10, 2007 10:41 AM To: Tomcat Users List Subject: Re: error-page and TC 5.5.23 I know there are committers reading this list, but you might want to ping this question off the dev list. You could also search for a follow up issue in bugzilla to address the new problem. If one doesn't exist, go ahead and submit one. --David gb1071nx wrote: I was under the impression that the exception traps are part of the spec, somewhere in srv.9.9. I expect someone here to say: yes, it's part of the spec that we broke in TC 5.5, and we'll fix it or : that's not part of the spec, so who cares that it doesn't work or: part of the spec, but who cares. I just want a response from someone with the power to fix it, that it will be fixed (or not). -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, May 10, 2007 10:20 AM To: Tomcat Users List Subject: Re: error-page and TC 5.5.23 Reading the comments on the bug issue you cited, it looks like it's fixed, but with side effects -- namely the exception traps aren't available any more. What do you want anyone to say here? --David gb1071nx wrote: Is this just a boring question, or has no-one else run into the problem? -Original Message- From: gb1071nx [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 08, 2007 2:22 PM To: Tomcat Users List Subject: RE: error-page and TC 5.5.23 I'm just adding to this: When I remove the mapping for the error-code 500, then I get the standard tc5.5 error page. So my exception-type error-page directive is being ignored. So it does appear that http://issues.apache.org/bugzilla/show_bug.cgi?id=37062#c4 isn't fixed. And won't be fixed? It occurs to me that this should break quite a few working apps though, so surely someone else has reported it? Searching further, I found this: http://issues.apache.org/bugzilla/show_bug.cgi?id=40135 Is it then now a requirement that for JSP's, we *must* use the errorPage directive? Or is there a way to get the more generic web.xml error-page config to work? And can anyone explain what is meant by development mode (from comment in bug 37062 and how to switch it off (to see if that makes my error-page's work again) -Original Message- From: gb1071nx [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 08, 2007 12:39 PM To: Tomcat Users List Subject: error-page and TC 5.5.23 Hello, I'm starting the process of migrating some of our server from 5.0.29 to 5.5.23, and I've found that the 'nice' useful stacktraces with linenumbers are back, and working beautifully in 5.5.23. But I do find the following issues as well: I have the following test page: html body % if (true) { throw new java.sql.SQLException(TEST); } % /body /html And the following web.xml: ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 error-page exception-typejava.sql.SQLException/exception-type location/error/database.jsp/location /error-page error-page error-code500/error-code location/error/500.jsp/location /error-page /web-app And when I call the page throwing the SQLException, I get the error page for the error-code 500. Tomcat5.0 does not behave like that, 5.5 does. Which is the correct behaviour? (or perhaps: is there a way to configure 5.5 so that it acts like 5.0?) I recall this bug report: http://issues.apache.org/bugzilla/show_bug.cgi?id=37062#c4 . Has the bug reported in comment#4 been fixed? Is this the bug I'm experiencing in my test page? Also, I can confirm the following bug, I also experience it: http://issues.apache.org/bugzilla/show_bug.cgi?id=42314
Re: error-page directive in 5.5.20 - resending
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Eqbal, Eqbal wrote: I have an error-page directive in a webapp's web.xml to display a custom error page on 404/500 errors. . It works on my local machine which has Tomcat 5.5.17, but it does not work on my server which has 5.5.20 installed. Any ideas? Can you be more specific when you say doesn't work? Does it throw an exception? Does the generic Tomcat error message show up on the user's browser? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGJ21U9CaO5/Lv0PARApNIAJ9mIu3CYsgPHZMkUfw0EsRX0Pv60ACgtqYs nR1Tw5eI4k75efEFa6rkRWs= =ZuU1 -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error-page directive in 5.5.20 - resending
Yes. It does not go to my custom page. It instead shows the default Tomcat messages. I also tried the changes suggested by Rashmi earlier but doesn't seem to work. Thanks. --- Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Eqbal, Eqbal wrote: I have an error-page directive in a webapp's web.xml to display a custom error page on 404/500 errors. . It works on my local machine which has Tomcat 5.5.17, but it does not work on my server which has 5.5.20 installed. Any ideas? Can you be more specific when you say doesn't work? Does it throw an exception? Does the generic Tomcat error message show up on the user's browser? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGJ21U9CaO5/Lv0PARApNIAJ9mIu3CYsgPHZMkUfw0EsRX0Pv60ACgtqYs nR1Tw5eI4k75efEFa6rkRWs= =ZuU1 -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error-page
I have an error-page directive in a webapp's web.xml to display a custom error page on 404/500 errors. . It works on my local machine which has Tomcat 5.5.17, but it does not work on my server which has 5.5.20 installed. Any ideas? Below is my web.xml: -- ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameNavigation Update Application/display-name !-- Standard Action Servlet Configuration -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param load-on-startup2/load-on-startup /servlet !-- Standard Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping welcome-file-list welcome-filenavigationPassword.jsp/welcome-file /welcome-file-list error-page error-code500/error-code location/error.jsp/location /error-page error-page error-code404/error-code location/error.jsp/location /error-page taglib taglib-uri/tags/struts-bean/taglib-uri taglib-location/WEB-INF/tlds/struts-bean.tld /taglib-location /taglib taglib taglib-uri/tags/struts-html/taglib-uri taglib-location/WEB-INF/tlds/struts-html.tld /taglib-location /taglib /web-app __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error-page
When starting a new thread (ie sending a message to the list about a new topic) please do not reply to an existing message and change the subject line. To many of the list archiving services and mail clients used by list subscribers this makes your new message appear as part of the old thread. This makes it harder for other users to find relevant information when searching the lists. This is known as thread hijacking and is behaviour that is frowned upon on this list. Frequent offenders will be removed from the list. It should also be noted that many list subscribers automatically ignore any messages that hijack another thread. The correct procedure is to create a new message with a new subject. This will start a new thread. Mark tomcat-user-owner - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error-page
I did not realize/know that this will create a problem. I apologize for doing that. I have sent a new message for my topic/question. Thanks for bringing it to my attention. --- Mark Thomas [EMAIL PROTECTED] wrote: When starting a new thread (ie sending a message to the list about a new topic) please do not reply to an existing message and change the subject line. To many of the list archiving services and mail clients used by list subscribers this makes your new message appear as part of the old thread. This makes it harder for other users to find relevant information when searching the lists. This is known as thread hijacking and is behaviour that is frowned upon on this list. Frequent offenders will be removed from the list. It should also be noted that many list subscribers automatically ignore any messages that hijack another thread. The correct procedure is to create a new message with a new subject. This will start a new thread. Mark tomcat-user-owner - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error-page directive in 5.5.20 - resending
Hi Eqbal, Try upgrading the DTD/Schema URIs to 2.4 version since that's the latest version supported by 5.5.x . To upgrade, remove these lines: !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; and change the web-app node to web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; Also move the error-page nodes to the bottom of the web.xml , that is after the taglib nodes. to display a custom error page on 404/500 errors. . It works on my local machine which has Tomcat 5.5.17, but it does not work on my server which has 5.5.20 installed. Any ideas? Could you please elaborate -- does not work doesn't give us much clue as to what may be wrong. -Rashmi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error-page http status 408
Nope, my server is only running Tomcat. There is nothing else involved. -rg On 12/30/06, Mark Thomas [EMAIL PROTECTED] wrote: rg wrote: I am using Tomcat 5.5.17 on Windows. I have a problem setting a 408 error-page in my web.xml on form based authentication. Random thought. Are you using httpd at all? If so, try going direct to Tomcat and getting that to work first. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error-page http status 408
rg wrote: I am using Tomcat 5.5.17 on Windows. I have a problem setting a 408 error-page in my web.xml on form based authentication. Random thought. Are you using httpd at all? If so, try going direct to Tomcat and getting that to work first. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error page
It could be that the error page itself is throwing an error. Try using an ultra-simple error page. -- Len On 5/18/06, Zohar [EMAIL PROTECTED] wrote: No, I've used the Letting a page define its error page option. - Original Message - From: Franck Borel [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, May 18, 2006 14:20 Subject: Re: error page I'm trying to use the error handling mechanism described in http://java.sun.com/developer/EJTechTips/2003/tt0114.html. When an exception in thrown in JSP1 it is indeed redirected to JSP2. in JSP2 I've put System.out.println(exception.getMessage()); and sure enough the exception's message is printed. But what I get as a response to the browser is HTTP 500. Have you make an entry like this in your Web deployment descriptor (web.xml)? !-- Catch a system error using an HTML page -- error-page exception-typeyour.exception. /exception-type location/JSP2.jsp/location /error-page -- Franck - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re: error page
all it does is put h1%=exception.getMessage()%/h1 I am a bit lost here. The way I set my error page is : errorPage=error.jsp Should I use errorPage=/error.jsp instead? Thanks for your reply, Zohar. Date: Sat, 20 May 2006 14:05:20 -0400 From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: Re: error page It could be that the error page itself is throwing an error. Try using an ultra-simple error page. -- Len On 5/18/06, Zohar [EMAIL PROTECTED] wrote: No, I've used the Letting a page define its error page option. - Original Message - From: Franck Borel [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, May 18, 2006 14:20 Subject: Re: error pageI'm trying to use the error handling mechanism described in http://java.sun.com/developer/EJTechTips/2003/tt0114.html. When an exception in thrown in JSP1 it is indeed redirected to JSP2. in JSP2 I've put System.out.println(exception.getMessage()); and sure enough the exception's message is printed. But what I get as a response to the browser is HTTP 500. Have you make an entry like this in your Web deployment descriptor (web.xml)? !-- Catch a system error using an HTML page --error-page exception-typeyour.exception. /exception-type location/JSP2.jsp/location/error-page -- Franck - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Join the next generation of Hotmail and you could win the adventure of a lifetime http://www.imagine-msn.com/minisites/sweepstakes/mail/register.aspx
RE: Re: error page
If anyone has an example I'd love seeing it... Date: Sat, 20 May 2006 14:05:20 -0400 From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: Re: error page It could be that the error page itself is throwing an error. Try using an ultra-simple error page. -- Len On 5/18/06, Zohar [EMAIL PROTECTED] wrote: No, I've used the Letting a page define its error page option. - Original Message - From: Franck Borel [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, May 18, 2006 14:20 Subject: Re: error pageI'm trying to use the error handling mechanism described in http://java.sun.com/developer/EJTechTips/2003/tt0114.html. When an exception in thrown in JSP1 it is indeed redirected to JSP2. in JSP2 I've put System.out.println(exception.getMessage()); and sure enough the exception's message is printed. But what I get as a response to the browser is HTTP 500. Have you make an entry like this in your Web deployment descriptor (web.xml)? !-- Catch a system error using an HTML page --error-page exception-typeyour.exception. /exception-type location/JSP2.jsp/location/error-page -- Franck - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Join the next generation of Hotmail and you could win the adventure of a lifetime http://www.imagine-msn.com/minisites/sweepstakes/mail/register.aspx
Re: error page
On 5/18/06, Zohar [EMAIL PROTECTED] wrote: When an exception in thrown in JSP1 it is indeed redirected to JSP2. in JSP2 I've put System.out.println(exception.getMessage()); and sure enough the exception's message is printed. But what I get as a response to the browser is HTTP 500. Sounds correct to me -- that's the error code. Are you saying that your JSP2 error page doesn't generate any visible output? Is it possible you're using MS IE and your page's output falls below the show friendly (sic) messages threshold? -- Hassan Schroeder [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: error page
On 5/20/06, Zohar Amir [EMAIL PROTECTED] wrote: JSP2 should display the exception's message. What is this show friendly (sic) messages threshold? ? MS IE will show it's own friendly message instead of yours if the page size is less that some threshold value -- I forget exactly how big -- but you should test using some other browser (Firefox, Opera, whatever). -- Hassan Schroeder [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error page
I'm trying to use the error handling mechanism described in http://java.sun.com/developer/EJTechTips/2003/tt0114.html. When an exception in thrown in JSP1 it is indeed redirected to JSP2. in JSP2 I've put System.out.println(exception.getMessage()); and sure enough the exception's message is printed. But what I get as a response to the browser is HTTP 500. Have you make an entry like this in your Web deployment descriptor (web.xml)? !-- Catch a system error using an HTML page -- error-page exception-typeyour.exception. /exception-type location/JSP2.jsp/location /error-page -- Franck - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error page
No, I've used the Letting a page define its error page option. - Original Message - From: Franck Borel [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, May 18, 2006 14:20 Subject: Re: error page I'm trying to use the error handling mechanism described in http://java.sun.com/developer/EJTechTips/2003/tt0114.html. When an exception in thrown in JSP1 it is indeed redirected to JSP2. in JSP2 I've put System.out.println(exception.getMessage()); and sure enough the exception's message is printed. But what I get as a response to the browser is HTTP 500. Have you make an entry like this in your Web deployment descriptor (web.xml)? !-- Catch a system error using an HTML page -- error-page exception-typeyour.exception. /exception-type location/JSP2.jsp/location /error-page -- Franck - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error-page for nonexistent context
Mark Thomas wrote: Paul Singleton wrote: (I am required to anonymiee a Tomcat 5.5 server from hackers trying to discover its version etc.) If I put this in conf/web.xml error-page error-code404/error-code location/anon_error.jsp/location /error-page *and* put an anon_error.jsp in every web app, then I can replace the built-in error page. But where will Tomcat look for /anon_error.jsp when a (page within a) nonexistent context is requested? I haven't tested this... I would expect an unknown context to be mapped to the ROOT context given the mapping rules defined in section SRV.11.1 If the context isn't recognised, then the longest macthing context path will be / which is the ROOT context. Thanks for this: I think you're right, and I have now tested this in 5.5.9 (which of course is not necessarily the version I'm trying to anonymise :-) and it works. cheers - Paul S. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error-page for nonexistent context
Paul Singleton wrote: (I am required to anonymiee a Tomcat 5.5 server from hackers trying to discover its version etc.) If I put this in conf/web.xml error-page error-code404/error-code location/anon_error.jsp/location /error-page *and* put an anon_error.jsp in every web app, then I can replace the built-in error page. But where will Tomcat look for /anon_error.jsp when a (page within a) nonexistent context is requested? I haven't tested this... I would expect an unknown context to be mapped to the ROOT context given the mapping rules defined in section SRV.11.1 If the context isn't recognised, then the longest macthing context path will be / which is the ROOT context. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error-page for nonexistent context
Paul Singleton wrote: (I am required to anonymiee a Tomcat 5.5 server from hackers trying to discover its version etc.) If I put this in conf/web.xml error-page error-code404/error-code location/anon_error.jsp/location /error-page *and* put an anon_error.jsp in every web app, then I can replace the built-in error page. But where will Tomcat look for /anon_error.jsp when a (page within a) nonexistent context is requested? e.g., http://localhost:8080/skldjfha ? Then I think you would want to alter the conf/web.xml for the DefaultServlet[1], placing the error-page/ element you have defined above in that file. [1] http://tomcat.apache.org/tomcat-5.5-doc/default-servlet.html Glen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]