Re: error page for error code 500?
I just tested it out and I get the same problem. I am currently capturing and using a custom error page for 500 errors when Tomcat is not responding. Ie. - I am using Apache's ErrorDocument 500 http://whatever in the httpd.conf. This works fine. I was also able to capture Tomcat's 404 error-page using the tags. But the 500 error page capture in the web.xml didn't work. 404 /errors/generic.html 500 /errors/generic.html Sorry, no answer, just recreation of the problem. Dodd - Original Message - From: <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, February 04, 2003 9:54 AM Subject: RE: error page for error code 500? > > Thank you for the reply. > > I should be clearer. We are developing a struts app and I am using tiles > and declarative error handling features. > My goal is to have the user only my error pages (not server errors ect.) > I know that certain errors fall outside of the struts controller. > > Over the course of development, I have triggered the odd 404,400, and 500 > tomcat error page. > In web.xml i was able to map 404 and 400 but not 500. > > I can simulate each error: > 404 - calling a non existent page > 400 - calling a non existent action mapping > 500 - calling without a web app context: ie /action.do instead of > /myApp/action.do(I'm sure there are other ways..) > > The reason I posted to this list is that I am under the understanding that > I could map any error code to a page. > > Am I wrong? > > > 404 > /error/ServerError404Page.jsp > > > > 400 > /error/Server400ErrorPage.jsp > > > > > 500 > /error/Server500ErrorPage.jsp > > > Thanks for the help.. > > > > > > "Craig R. McClanahan" <[EMAIL PROTECTED]> on 02/03/2003 10:01:07 PM > > Please respond to "Tomcat Users List" <[EMAIL PROTECTED]> > > To:Tomcat Users List <[EMAIL PROTECTED]> > cc: > > Subject:RE: error page for error code 500? > > > > > On Tue, 4 Feb 2003, Chong, Kwong wrote: > > > Date: Tue, 4 Feb 2003 09:04:42 +1100 > > From: "Chong, Kwong" <[EMAIL PROTECTED]> > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]> > > To: 'Tomcat Users List' <[EMAIL PROTECTED]> > > Subject: RE: error page for error code 500? > > > > > > Doesn't error 500 means the server (tomcat) isn't responding? > > in which case, if there's a problem with tomcat, it can't then process > the > > request to tell you there's a problem ;) > > > > By far the most common cause is that Tomcat is running fine, but your > servlet or JSP page threw an exception. The only way to know for sure is > to examine the exception traceback that is presented in the response > and/or in the log files created by Tomcat in the $CATALINA_HOME/logs > directory. > > Just for fun, run the following JSP page and see what you get: > > <% > int i = 5; > int j = 0; > int k = i / j; > %> > > and examine the stack trace that shows up (a divide by zero error). > That's an application programming error, and nothing to do with the > container. > > Craig > > - > 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: error page for error code 500?
That is a good point. You can tell that I am new to server issues. ( so far I just live in my little web app world ). It is my desire to trap JSPExceptions as well, and if possible all java.lang.Exceptions.. Do other people do this? More testing Thanks again. Jon Wingfield <[EMAIL PROTECTED]> on 02/04/2003 10:10:30 AM Please respond to "Tomcat Users List" <[EMAIL PROTECTED]> To:Tomcat Users List <[EMAIL PROTECTED]> cc: Subject: Re: error page for error code 500? If you are trying to generate a 500 by accessing a url outside a context then the error page defined within the context won't get triggered. Where are you putting your error-page tags? You could try altering the web.xml in tomcats conf directory... [EMAIL PROTECTED] wrote: >Thank you for the reply. > >I should be clearer. We are developing a struts app and I am using tiles >and declarative error handling features. >My goal is to have the user only my error pages (not server errors ect.) >I know that certain errors fall outside of the struts controller. > >Over the course of development, I have triggered the odd 404,400, and 500 >tomcat error page. >In web.xml i was able to map 404 and 400 but not 500. > >I can simulate each error: >404 - calling a non existent page >400 - calling a non existent action mapping >500 - calling without a web app context: ie /action.do instead of >/myApp/action.do(I'm sure there are other ways..) > >The reason I posted to this list is that I am under the understanding that >I could map any error code to a page. > >Am I wrong? > > >404 >/error/ServerError404Page.jsp > > > >400 >/error/Server400ErrorPage.jsp > > > > >500 >/error/Server500ErrorPage.jsp > > > Thanks for the help.. > > > > > >"Craig R. McClanahan" <[EMAIL PROTECTED]> on 02/03/2003 10:01:07 PM > >Please respond to "Tomcat Users List" <[EMAIL PROTECTED]> > >To:Tomcat Users List <[EMAIL PROTECTED]> >cc: > >Subject:RE: error page for error code 500? > > > > >On Tue, 4 Feb 2003, Chong, Kwong wrote: > > > >>Date: Tue, 4 Feb 2003 09:04:42 +1100 >>From: "Chong, Kwong" <[EMAIL PROTECTED]> >>Reply-To: Tomcat Users List <[EMAIL PROTECTED]> >>To: 'Tomcat Users List' <[EMAIL PROTECTED]> >>Subject: RE: error page for error code 500? >> >> >>Doesn't error 500 means the server (tomcat) isn't responding? >>in which case, if there's a problem with tomcat, it can't then process >> >> >the > > >>request to tell you there's a problem ;) >> >> >> > >By far the most common cause is that Tomcat is running fine, but your >servlet or JSP page threw an exception. The only way to know for sure is >to examine the exception traceback that is presented in the response >and/or in the log files created by Tomcat in the $CATALINA_HOME/logs >directory. > >Just for fun, run the following JSP page and see what you get: > > <% >int i = 5; >int j = 0; >int k = i / j; > %> > >and examine the stack trace that shows up (a divide by zero error). >That's an application programming error, and nothing to do with the >container. > >Craig > >- >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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error page for error code 500?
If you are trying to generate a 500 by accessing a url outside a context then the error page defined within the context won't get triggered. Where are you putting your error-page tags? You could try altering the web.xml in tomcats conf directory... [EMAIL PROTECTED] wrote: Thank you for the reply. I should be clearer. We are developing a struts app and I am using tiles and declarative error handling features. My goal is to have the user only my error pages (not server errors ect.) I know that certain errors fall outside of the struts controller. Over the course of development, I have triggered the odd 404,400, and 500 tomcat error page. In web.xml i was able to map 404 and 400 but not 500. I can simulate each error: 404 - calling a non existent page 400 - calling a non existent action mapping 500 - calling without a web app context: ie /action.do instead of /myApp/action.do(I'm sure there are other ways..) The reason I posted to this list is that I am under the understanding that I could map any error code to a page. Am I wrong? 404 /error/ServerError404Page.jsp 400 /error/Server400ErrorPage.jsp 500 /error/Server500ErrorPage.jsp Thanks for the help.. "Craig R. McClanahan" <[EMAIL PROTECTED]> on 02/03/2003 10:01:07 PM Please respond to "Tomcat Users List" <[EMAIL PROTECTED]> To:Tomcat Users List <[EMAIL PROTECTED]> cc: Subject:RE: error page for error code 500? On Tue, 4 Feb 2003, Chong, Kwong wrote: Date: Tue, 4 Feb 2003 09:04:42 +1100 From: "Chong, Kwong" <[EMAIL PROTECTED]> Reply-To: Tomcat Users List <[EMAIL PROTECTED]> To: 'Tomcat Users List' <[EMAIL PROTECTED]> Subject: RE: error page for error code 500? Doesn't error 500 means the server (tomcat) isn't responding? in which case, if there's a problem with tomcat, it can't then process the request to tell you there's a problem ;) By far the most common cause is that Tomcat is running fine, but your servlet or JSP page threw an exception. The only way to know for sure is to examine the exception traceback that is presented in the response and/or in the log files created by Tomcat in the $CATALINA_HOME/logs directory. Just for fun, run the following JSP page and see what you get: <% int i = 5; int j = 0; int k = i / j; %> and examine the stack trace that shows up (a divide by zero error). That's an application programming error, and nothing to do with the container. Craig - 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: error page for error code 500?
Thank you for the reply. I should be clearer. We are developing a struts app and I am using tiles and declarative error handling features. My goal is to have the user only my error pages (not server errors ect.) I know that certain errors fall outside of the struts controller. Over the course of development, I have triggered the odd 404,400, and 500 tomcat error page. In web.xml i was able to map 404 and 400 but not 500. I can simulate each error: 404 - calling a non existent page 400 - calling a non existent action mapping 500 - calling without a web app context: ie /action.do instead of /myApp/action.do(I'm sure there are other ways..) The reason I posted to this list is that I am under the understanding that I could map any error code to a page. Am I wrong? 404 /error/ServerError404Page.jsp 400 /error/Server400ErrorPage.jsp 500 /error/Server500ErrorPage.jsp Thanks for the help.. "Craig R. McClanahan" <[EMAIL PROTECTED]> on 02/03/2003 10:01:07 PM Please respond to "Tomcat Users List" <[EMAIL PROTECTED]> To:Tomcat Users List <[EMAIL PROTECTED]> cc: Subject:RE: error page for error code 500? On Tue, 4 Feb 2003, Chong, Kwong wrote: > Date: Tue, 4 Feb 2003 09:04:42 +1100 > From: "Chong, Kwong" <[EMAIL PROTECTED]> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]> > To: 'Tomcat Users List' <[EMAIL PROTECTED]> > Subject: RE: error page for error code 500? > > > Doesn't error 500 means the server (tomcat) isn't responding? > in which case, if there's a problem with tomcat, it can't then process the > request to tell you there's a problem ;) > By far the most common cause is that Tomcat is running fine, but your servlet or JSP page threw an exception. The only way to know for sure is to examine the exception traceback that is presented in the response and/or in the log files created by Tomcat in the $CATALINA_HOME/logs directory. Just for fun, run the following JSP page and see what you get: <% int i = 5; int j = 0; int k = i / j; %> and examine the stack trace that shows up (a divide by zero error). That's an application programming error, and nothing to do with the container. Craig - 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 error code 500?
On Tue, 4 Feb 2003, Chong, Kwong wrote: > Date: Tue, 4 Feb 2003 09:04:42 +1100 > From: "Chong, Kwong" <[EMAIL PROTECTED]> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]> > To: 'Tomcat Users List' <[EMAIL PROTECTED]> > Subject: RE: error page for error code 500? > > > Doesn't error 500 means the server (tomcat) isn't responding? > in which case, if there's a problem with tomcat, it can't then process the > request to tell you there's a problem ;) > By far the most common cause is that Tomcat is running fine, but your servlet or JSP page threw an exception. The only way to know for sure is to examine the exception traceback that is presented in the response and/or in the log files created by Tomcat in the $CATALINA_HOME/logs directory. Just for fun, run the following JSP page and see what you get: <% int i = 5; int j = 0; int k = i / j; %> and examine the stack trace that shows up (a divide by zero error). That's an application programming error, and nothing to do with the container. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: error page for error code 500?
Doesn't error 500 means the server (tomcat) isn't responding? in which case, if there's a problem with tomcat, it can't then process the request to tell you there's a problem ;) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 4 February 2003 5:46 To: [EMAIL PROTECTED] Subject: error page for error code 500? Greetings, My apologies for this simple question... I am using 4.0.4 I am able to capture the error codes 404 and 400 but not 500. My snippet bellow... 404 /error/ServerError404Page.jsp 400 /error/Server400ErrorPage.jsp 500 /error/Server500ErrorPage.jsp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] www.sensis.com.au A leading Australian advertising, information and directories business. www.yellowpages.com.au www.whitepages.com.au www.citysearch.com.au www.whereis.com.au www.telstra.com.au This email and any attachments are intended only for the use of the recipient and may be confidential and/or legally privileged. Sensis Pty Ltd disclaims liability for any errors, omissions, viruses, loss and/or damage arising from using, opening or transmitting this email. If you are not the intended recipient you must not use, interfere with, disclose, copy or retain this email and you should notify the sender immediately by return email or by contacting Sensis Pty Ltd by telephone on [+61 3 9201 4888] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]