You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Mike Leonardo <mi...@ifactory.com> on 2008/10/14 16:37:55 UTC

T5 Override 404 Page

Hello,

I'm looking to override the 404 page with my own custom one. I've scanned around the wiki how-to pages and can't find much. Can anyone point me to any resources or documentation that would help?
Thanks!

- Mike Leonardo


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5 Override 404 Page

Posted by Ulrich Stärk <ul...@spielviel.de>.
Ahh OK, that's because I am using an Index page instead of Start.

If I'm not mistaken, than the error page you see should be the ErrorReport
page in o.a.t.corelib.pages. You can override that with your own one. An
example is in the wiki. There are also some alternatives to handle 404s,
search the mailing list archives.

Uli

Am Di, 14.10.2008, 16:49, schrieb Ulrich Stärk:
> I don't know which 404 page you are seeing. If I want to navigate to a
> non-existing page I just get the Index page...
>
> Uli
>
> Am Di, 14.10.2008, 16:37, schrieb Mike Leonardo:
>> Hello,
>>
>> I'm looking to override the 404 page with my own custom one. I've
>> scanned
>> around the wiki how-to pages and can't find much. Can anyone point me to
>> any resources or documentation that would help?
>> Thanks!
>>
>> - Mike Leonardo
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5 Override 404 Page

Posted by Ulrich Stärk <ul...@spielviel.de>.
I don't know which 404 page you are seeing. If I want to navigate to a
non-existing page I just get the Index page...

Uli

Am Di, 14.10.2008, 16:37, schrieb Mike Leonardo:
> Hello,
>
> I'm looking to override the 404 page with my own custom one. I've scanned
> around the wiki how-to pages and can't find much. Can anyone point me to
> any resources or documentation that would help?
> Thanks!
>
> - Mike Leonardo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5 Override 404 Page

Posted by Tobias Wehrum <Le...@dragonlab.de>.
Maybe this, for example?
http://www.nabble.com/t5%3A-a-default-page-for-non-exist-path-tp18980767p18980767.html

- Tobias

Ulrich Stärk schrieb:
> There has been some discussions about this in the past. I can't give you a
> link without searching myself so I suggest you search nabble or markmail
> for 404 and/or index.
>
> Uli
>
> Am Di, 14.10.2008, 17:22, schrieb Mike Leonardo:
>   
>> Hey,
>>
>> Thanks for the responses, I've given this a go and I am having a bit of
>> trouble.
>> When I add the:
>> <error-page>
>>    <error-code>404</error-code>
>>    <location>/error404.jsp</location>
>> </error-page>
>>
>> to the web.xml and restart - my application will still redirect all fake
>> urls to my Index page.
>> I'm running Jetty. Any thoughts?
>>
>> - Mike Leonardo
>>
>>
>> ----- Original Message -----
>> From: "Peter Stavrinides" <P....@albourne.com>
>> To: "Tapestry users" <us...@tapestry.apache.org>
>> Sent: Tuesday, October 14, 2008 10:50:24 AM (GMT-0500) America/New_York
>> Subject: Re: T5 Override 404 Page
>>
>> Adding a small article to the wiki for this may be a good idea since this
>> question pops up from time to time:
>>
>> Add a directive like this to your web.xml:
>> <error-page>
>>    <error-code>404</error-code>
>>    <location>/error404.jsp</location>
>> </error-page>
>>
>> One thing to remember is that a 404 page overrides the servers error page
>> so is outside of your application context, so you add the overridden page
>> in the root of the webapp directory. Then add this directive to the head
>> of error404.jsp: <%@ page isErrorPage="true" %>, and thats it.
>>
>>
>> ----- Original Message -----
>> From: "Mike Leonardo" <mi...@ifactory.com>
>> To: "Tapestry users" <us...@tapestry.apache.org>
>> Sent: Tuesday, 14 October, 2008 5:37:55 PM GMT +02:00 Athens, Beirut,
>> Bucharest, Istanbul
>> Subject: T5 Override 404 Page
>>
>> Hello,
>>
>> I'm looking to override the 404 page with my own custom one. I've scanned
>> around the wiki how-to pages and can't find much. Can anyone point me to
>> any resources or documentation that would help?
>> Thanks!
>>
>> - Mike Leonardo
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>     
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5 Override 404 Page

Posted by Ulrich Stärk <ul...@spielviel.de>.
There has been some discussions about this in the past. I can't give you a
link without searching myself so I suggest you search nabble or markmail
for 404 and/or index.

Uli

Am Di, 14.10.2008, 17:22, schrieb Mike Leonardo:
> Hey,
>
> Thanks for the responses, I've given this a go and I am having a bit of
> trouble.
> When I add the:
> <error-page>
>    <error-code>404</error-code>
>    <location>/error404.jsp</location>
> </error-page>
>
> to the web.xml and restart - my application will still redirect all fake
> urls to my Index page.
> I'm running Jetty. Any thoughts?
>
> - Mike Leonardo
>
>
> ----- Original Message -----
> From: "Peter Stavrinides" <P....@albourne.com>
> To: "Tapestry users" <us...@tapestry.apache.org>
> Sent: Tuesday, October 14, 2008 10:50:24 AM (GMT-0500) America/New_York
> Subject: Re: T5 Override 404 Page
>
> Adding a small article to the wiki for this may be a good idea since this
> question pops up from time to time:
>
> Add a directive like this to your web.xml:
> <error-page>
>    <error-code>404</error-code>
>    <location>/error404.jsp</location>
> </error-page>
>
> One thing to remember is that a 404 page overrides the servers error page
> so is outside of your application context, so you add the overridden page
> in the root of the webapp directory. Then add this directive to the head
> of error404.jsp: <%@ page isErrorPage="true" %>, and thats it.
>
>
> ----- Original Message -----
> From: "Mike Leonardo" <mi...@ifactory.com>
> To: "Tapestry users" <us...@tapestry.apache.org>
> Sent: Tuesday, 14 October, 2008 5:37:55 PM GMT +02:00 Athens, Beirut,
> Bucharest, Istanbul
> Subject: T5 Override 404 Page
>
> Hello,
>
> I'm looking to override the 404 page with my own custom one. I've scanned
> around the wiki how-to pages and can't find much. Can anyone point me to
> any resources or documentation that would help?
> Thanks!
>
> - Mike Leonardo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5 Override 404 Page

Posted by Mike Leonardo <mi...@ifactory.com>.
Hey,

Thanks for the responses, I've given this a go and I am having a bit of trouble.
When I add the:
<error-page>
   <error-code>404</error-code>
   <location>/error404.jsp</location> 
</error-page>

to the web.xml and restart - my application will still redirect all fake urls to my Index page.
I'm running Jetty. Any thoughts?

- Mike Leonardo


----- Original Message -----
From: "Peter Stavrinides" <P....@albourne.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Tuesday, October 14, 2008 10:50:24 AM (GMT-0500) America/New_York
Subject: Re: T5 Override 404 Page

Adding a small article to the wiki for this may be a good idea since this question pops up from time to time:

Add a directive like this to your web.xml:
<error-page> 
   <error-code>404</error-code>
   <location>/error404.jsp</location>  
</error-page>

One thing to remember is that a 404 page overrides the servers error page so is outside of your application context, so you add the overridden page in the root of the webapp directory. Then add this directive to the head of error404.jsp: <%@ page isErrorPage="true" %>, and thats it.


----- Original Message -----
From: "Mike Leonardo" <mi...@ifactory.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Tuesday, 14 October, 2008 5:37:55 PM GMT +02:00 Athens, Beirut, Bucharest, Istanbul
Subject: T5 Override 404 Page

Hello,

I'm looking to override the 404 page with my own custom one. I've scanned around the wiki how-to pages and can't find much. Can anyone point me to any resources or documentation that would help?
Thanks!

- Mike Leonardo


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5 Override 404 Page

Posted by Peter Stavrinides <P....@albourne.com>.
Adding a small article to the wiki for this may be a good idea since this question pops up from time to time:

Add a directive like this to your web.xml:
<error-page> 
   <error-code>404</error-code>
   <location>/error404.jsp</location>  
</error-page>

One thing to remember is that a 404 page overrides the servers error page so is outside of your application context, so you add the overridden page in the root of the webapp directory. Then add this directive to the head of error404.jsp: <%@ page isErrorPage="true" %>, and thats it.


----- Original Message -----
From: "Mike Leonardo" <mi...@ifactory.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Tuesday, 14 October, 2008 5:37:55 PM GMT +02:00 Athens, Beirut, Bucharest, Istanbul
Subject: T5 Override 404 Page

Hello,

I'm looking to override the 404 page with my own custom one. I've scanned around the wiki how-to pages and can't find much. Can anyone point me to any resources or documentation that would help?
Thanks!

- Mike Leonardo


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org