Isn't T5 acting as a filter?  So if Tomcat/etc hands control to T5 to
find the correct resource/page, T5 has the opportunity to handle
things like error messages.  Is it out of the question for Tapestry to
provide base error pages that we can override, or configure Tapestry
to pass errors back to the container?  Then we'd only have to
implement HTTP500.java, etc.

As far as having the container redirect to another Tapestry page, that
should be ok too, unless you're using IE.  (I know, WTH?!?)
A quick look here:
http://www.velocityreviews.com/forums/t142707-tomcat-404-custom-error.html

Shows that if you want relatively short error messages (less than 512B),

The fool proof way is to redirect to another page, I'm guessing inside
your Servlet/filter:
response.sendRedirect("http://blah/404.html";);
(thereby bypassing IE's Friendly Error Page thing)

One problem with handling the error within Tapestry is that now your
Tapestry app should be logging 404's etc, if you had planned to do
such things.  I don't think Tomcat would log the error if Tapestry
handles it.



On Jan 23, 2008 6:07 PM, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
> Chances are, Tapestry is passing on the requests because there are
> real static HTML files present.
>
> The problem is that if you delete 505.html, you need to come up with a
> class named 505.  That's going to be a problem :-).
>
> I'm not sure what the servlet container will do if you configure the
> <location> of the <error-page> to a virtual resources such as a
> Tapestry page.
>
> I suspect it will work in Jetty and not work in Tomcat :-)
>
> I haven't experimented with this at all, I'm afraid.
>
>
> On Jan 23, 2008 7:01 AM, Peter Stavrinides <[EMAIL PROTECTED]> wrote:
> > Hi
> >
> > I would like to customize the various error pages for my servlet
> > (404,500,401 etc...), I have implemented the configuration in my
> > web.xml, but Tapestry 5 doesn't pick them up... how should I go about this?
> >
> > Thanks
> > Peter
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to