Re: Create error page T4.0.2
What I do is override the ExceptionPresenter service. My own implementation somehow reads a system property, then redirects to either a custom generic page or the standard tapestry exception page depending on the environment (dev or prod). 2007/4/29, Jesse Kuhnert <[EMAIL PROTECTED]>: Thanks will fix. On 4/28/07, Martin Strand <[EMAIL PROTECTED]> wrote: > > That page says "tapestry.Infrastructure", it should be > "tapestry.InfrastructureOverrides" > > Martin > > On Sun, 29 Apr 2007 04:44:19 +0200, Jesse Kuhnert <[EMAIL PROTECTED]> > wrote: > > > Right. For more on the hivemind specifics only see: > > > > > http://tapestry.apache.org/tapestry4.1/developmentguide/exceptionpages.html > > > > On 4/27/07, jake123 <[EMAIL PROTECTED]> wrote: > >> > >> > >> Hi Josh, > >> you can do a infrastructur override in your hivemodule.xml like this: > >> > >> > >> >> /> > >> > >> > >> and then you create your own CustomExceptionPage: > >> > >> public abstract class CustomExceptionPage extends Exception implements > >> PageDetachListener { > >> > >> private static Logger log = > >> LoggerFactory.getLogger(CustomExceptionPage.class); > >> > >> public abstract void setExceptions(ExceptionDescription[] exceptions); > >> > >> public void setException(Throwable value){ > >> > >> value.printStackTrace(); > >> try { > >> /* Send email with the error msg */ > >> > getCommunicationService().sendErrorExceptionEmail(value); > >> } catch (Throwable exept) { > >> // DO NOTHING... > >> } > >> > >> } > >> > >> } > >> > >> you can also create a filter in here that ignores the error msgs that's > >> creates by the web spiders and bots... if you want to.. > >> > >> Cheers, > >> Jacob > >> > >> > >> Josh Joy wrote: > >> > > >> > Hi, > >> > > >> > Sorry, though I've tried looking for the documentation > >> > though I probably > >> > just missed it... > >> > If tapestry experiences an error, for example I have > >> > an invalid HTML > >> > template so it will have a parsing error, or perhaps I > >> > have an > >> > application error, Tapestry will display a very nice > >> > exception page with > >> > stack trace and various other info. This is helpful > >> > for development, > >> > though for production how can I define my own error > >> > page? > >> > > >> > Thanks, > >> > Josh > >> > > >> > - > >> > To unsubscribe, e-mail: [EMAIL PROTECTED] > >> > For additional commands, e-mail: [EMAIL PROTECTED] > >> > > >> > > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/Create-error-page-T4.0.2-tf3659480.html#a10227693 > >> Sent from the Tapestry - User mailing list archive at Nabble.com. > >> > >> > >> - > >> 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] > > -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
Re: Create error page T4.0.2
Thanks will fix. On 4/28/07, Martin Strand <[EMAIL PROTECTED]> wrote: That page says "tapestry.Infrastructure", it should be "tapestry.InfrastructureOverrides" Martin On Sun, 29 Apr 2007 04:44:19 +0200, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: > Right. For more on the hivemind specifics only see: > > http://tapestry.apache.org/tapestry4.1/developmentguide/exceptionpages.html > > On 4/27/07, jake123 <[EMAIL PROTECTED]> wrote: >> >> >> Hi Josh, >> you can do a infrastructur override in your hivemodule.xml like this: >> >> >> > /> >> >> >> and then you create your own CustomExceptionPage: >> >> public abstract class CustomExceptionPage extends Exception implements >> PageDetachListener { >> >> private static Logger log = >> LoggerFactory.getLogger(CustomExceptionPage.class); >> >> public abstract void setExceptions(ExceptionDescription[] exceptions); >> >> public void setException(Throwable value){ >> >> value.printStackTrace(); >> try { >> /* Send email with the error msg */ >> getCommunicationService().sendErrorExceptionEmail(value); >> } catch (Throwable exept) { >> // DO NOTHING... >> } >> >> } >> >> } >> >> you can also create a filter in here that ignores the error msgs that's >> creates by the web spiders and bots... if you want to.. >> >> Cheers, >> Jacob >> >> >> Josh Joy wrote: >> > >> > Hi, >> > >> > Sorry, though I've tried looking for the documentation >> > though I probably >> > just missed it... >> > If tapestry experiences an error, for example I have >> > an invalid HTML >> > template so it will have a parsing error, or perhaps I >> > have an >> > application error, Tapestry will display a very nice >> > exception page with >> > stack trace and various other info. This is helpful >> > for development, >> > though for production how can I define my own error >> > page? >> > >> > Thanks, >> > Josh >> > >> > - >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Create-error-page-T4.0.2-tf3659480.html#a10227693 >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> - >> 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] -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
Re: Create error page T4.0.2
That page says "tapestry.Infrastructure", it should be "tapestry.InfrastructureOverrides" Martin On Sun, 29 Apr 2007 04:44:19 +0200, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: Right. For more on the hivemind specifics only see: http://tapestry.apache.org/tapestry4.1/developmentguide/exceptionpages.html On 4/27/07, jake123 <[EMAIL PROTECTED]> wrote: Hi Josh, you can do a infrastructur override in your hivemodule.xml like this: /> and then you create your own CustomExceptionPage: public abstract class CustomExceptionPage extends Exception implements PageDetachListener { private static Logger log = LoggerFactory.getLogger(CustomExceptionPage.class); public abstract void setExceptions(ExceptionDescription[] exceptions); public void setException(Throwable value){ value.printStackTrace(); try { /* Send email with the error msg */ getCommunicationService().sendErrorExceptionEmail(value); } catch (Throwable exept) { // DO NOTHING... } } } you can also create a filter in here that ignores the error msgs that's creates by the web spiders and bots... if you want to.. Cheers, Jacob Josh Joy wrote: > > Hi, > > Sorry, though I've tried looking for the documentation > though I probably > just missed it... > If tapestry experiences an error, for example I have > an invalid HTML > template so it will have a parsing error, or perhaps I > have an > application error, Tapestry will display a very nice > exception page with > stack trace and various other info. This is helpful > for development, > though for production how can I define my own error > page? > > Thanks, > Josh > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Create-error-page-T4.0.2-tf3659480.html#a10227693 Sent from the Tapestry - User mailing list archive at Nabble.com. - 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: Create error page T4.0.2
Right. For more on the hivemind specifics only see: http://tapestry.apache.org/tapestry4.1/developmentguide/exceptionpages.html On 4/27/07, jake123 <[EMAIL PROTECTED]> wrote: Hi Josh, you can do a infrastructur override in your hivemodule.xml like this: and then you create your own CustomExceptionPage: public abstract class CustomExceptionPage extends Exception implements PageDetachListener { private static Logger log = LoggerFactory.getLogger(CustomExceptionPage.class); public abstract void setExceptions(ExceptionDescription[] exceptions); public void setException(Throwable value){ value.printStackTrace(); try { /* Send email with the error msg */ getCommunicationService().sendErrorExceptionEmail(value); } catch (Throwable exept) { // DO NOTHING... } } } you can also create a filter in here that ignores the error msgs that's creates by the web spiders and bots... if you want to.. Cheers, Jacob Josh Joy wrote: > > Hi, > > Sorry, though I've tried looking for the documentation > though I probably > just missed it... > If tapestry experiences an error, for example I have > an invalid HTML > template so it will have a parsing error, or perhaps I > have an > application error, Tapestry will display a very nice > exception page with > stack trace and various other info. This is helpful > for development, > though for production how can I define my own error > page? > > Thanks, > Josh > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Create-error-page-T4.0.2-tf3659480.html#a10227693 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
Re: Create error page T4.0.2
Hi Josh, you can do a infrastructur override in your hivemodule.xml like this: and then you create your own CustomExceptionPage: public abstract class CustomExceptionPage extends Exception implements PageDetachListener { private static Logger log = LoggerFactory.getLogger(CustomExceptionPage.class); public abstract void setExceptions(ExceptionDescription[] exceptions); public void setException(Throwable value){ value.printStackTrace(); try { /* Send email with the error msg */ getCommunicationService().sendErrorExceptionEmail(value); } catch (Throwable exept) { // DO NOTHING... } } } you can also create a filter in here that ignores the error msgs that's creates by the web spiders and bots... if you want to.. Cheers, Jacob Josh Joy wrote: > > Hi, > > Sorry, though I've tried looking for the documentation > though I probably > just missed it... > If tapestry experiences an error, for example I have > an invalid HTML > template so it will have a parsing error, or perhaps I > have an > application error, Tapestry will display a very nice > exception page with > stack trace and various other info. This is helpful > for development, > though for production how can I define my own error > page? > > Thanks, > Josh > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Create-error-page-T4.0.2-tf3659480.html#a10227693 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Create error page T4.0.2
The absolute easiest thing to do is to create a page named Exception (.html and .page). This will then be picked up automatically as the Exception page. Unfortunately you may have to do some build script magic to differentiate between production and development. I have my production Exception page log the error to a log file using Tapestry's exception display code but just display something generic for the user. You should be able to override hivemind settings to accomplish this if you want to call you page something else. For more info there are various discussions of this in the email list archives. Matt Josh Joy wrote: Hi, Sorry, though I've tried looking for the documentation though I probably just missed it... If tapestry experiences an error, for example I have an invalid HTML template so it will have a parsing error, or perhaps I have an application error, Tapestry will display a very nice exception page with stack trace and various other info. This is helpful for development, though for production how can I define my own error page? Thanks, Josh - 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]