You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@click.apache.org by "Davis, Sirl" <Si...@standardchartered.com> on 2008/11/03 13:00:05 UTC

Customizing not-found.htm (404 errors for htm resources)

Hi,

 

I'd like to provide my own custom page for not-found.htm, however in the
ConfigService class, /click/not-found.htm is defined as static final so
it does not appear possible to change?  Also, I've added an error page
for all other errors as suggested by the FAQ, '8. Error Handling' for
htm files.  However, that does not handle 404 (not found pages).

 

Are there any suggestions for a solution to provide my own not-found.htm
file?

 

Regards,

 

Sirl


This email and any attachments are confidential and may also be privileged.  If you are not the addressee, do not disclose, copy, circulate or in any other way use or rely on the information contained in this email or any attachments.  If received in error, notify the sender immediately and delete this email and any attachments from your system.  Emails cannot be guaranteed to be secure or error free as the message and any attachments could be intercepted, corrupted, lost, delayed, incomplete or amended.  Standard Chartered PLC and its subsidiaries do not accept liability for damage caused by this email or any attachments and may monitor email traffic.

 

Standard Chartered PLC is incorporated in England with limited liability under company number 966425 and has its registered office at 1 Aldermanbury Square, London, EC2V 7SB.

 

Standard Chartered Bank ("SCB") is incorporated in England with limited liability by Royal Charter 1853, under reference ZC18.  The Principal Office of SCB is situated in England at 1 Aldermanbury Square, London EC2V 7SB. In the United Kingdom, SCB is authorised and regulated by the Financial Services Authority under FSA register number 114276.

 

If you are receiving this email from SCB outside the UK, please click http://www.standardchartered.com/global/email_disclaimer.html to refer to the information on other jurisdictions.


RE: Customizing not-found.htm (404 errors for htm resources)

Posted by "Davis, Sirl" <Si...@standardchartered.com>.
Hi,

Thanks this helps and works. 

I use the click not-found for *.htm not founds and the web.xml '404' for
*.html not founds.

Thanks,
Sirl

-----Original Message-----
From: Bob Schellink [mailto:sabob1@gmail.com] 
Sent: 03 November 2008 16:12
To: click-user@incubator.apache.org
Subject: Re: Customizing not-found.htm (404 errors for htm resources)

Hi Sirl,

There are some docs about not-found.htm here:
http://click.sourceforge.net/docs/pages.html#page-not-found

You are correct in that the path not-found.htm cannot be changed. 
Guess this can be called convention over configuration. But you are 
free to change the content of the template not-found.htm, Click won't 
override your custom changes.

Http status codes are handled by the servlet spec, Click does not 
repeat this functionality. An example 404 in web.xml:

<error-page>
     <error-code>404</error-code>
     <location>/Errorpage.htm</location>
</error-page>

Let us know if this helps.

kind regards

bob


Davis, Sirl wrote:
> Hi,
> 
>  
> 
> I'd like to provide my own custom page for not-found.htm, however in
the 
> ConfigService class, /click/not-found.htm is defined as static final
so 
> it does not appear possible to change?  Also, I've added an error page

> for all other errors as suggested by the FAQ, '8. Error Handling' for 
> htm files.  However, that does not handle 404 (not found pages).
> 
>  
> 
> Are there any suggestions for a solution to provide my own
not-found.htm 
> file?
> 
>  
> 
> Regards,
> 
>  
> 
> Sirl
> 
> This email and any attachments are confidential and may also be
privileged.  If you are not the addressee, do not disclose, copy,
circulate or in any other way use or rely on the information contained
in this email or any attachments.  If received in error, notify the
sender immediately and delete this email and any attachments from your
system.  Emails cannot be guaranteed to be secure or error free as the
message and any attachments could be intercepted, corrupted, lost,
delayed, incomplete or amended.  Standard Chartered PLC and its
subsidiaries do not accept liability for damage caused by this email or
any attachments and may monitor email traffic.
> 
>  
> 
> Standard Chartered PLC is incorporated in England with limited
liability under company number 966425 and has its registered office at 1
Aldermanbury Square, London, EC2V 7SB.
> 
>  
> 
> Standard Chartered Bank ("SCB") is incorporated in England with
limited liability by Royal Charter 1853, under reference ZC18.  The
Principal Office of SCB is situated in England at 1 Aldermanbury Square,
London EC2V 7SB. In the United Kingdom, SCB is authorised and regulated
by the Financial Services Authority under FSA register number 114276.
> 
>  
> 
> If you are receiving this email from SCB outside the UK, please click
http://www.standardchartered.com/global/email_disclaimer.html to refer
to the information on other jurisdictions.
> 
> 

This email and any attachments are confidential and may also be privileged.  If you are not the addressee, do not disclose, copy, circulate or in any other way use or rely on the information contained in this email or any attachments.  If received in error, notify the sender immediately and delete this email and any attachments from your system.  Emails cannot be guaranteed to be secure or error free as the message and any attachments could be intercepted, corrupted, lost, delayed, incomplete or amended.  Standard Chartered PLC and its subsidiaries do not accept liability for damage caused by this email or any attachments and may monitor email traffic.

 

Standard Chartered PLC is incorporated in England with limited liability under company number 966425 and has its registered office at 1 Aldermanbury Square, London, EC2V 7SB.

 

Standard Chartered Bank ("SCB") is incorporated in England with limited liability by Royal Charter 1853, under reference ZC18.  The Principal Office of SCB is situated in England at 1 Aldermanbury Square, London EC2V 7SB. In the United Kingdom, SCB is authorised and regulated by the Financial Services Authority under FSA register number 114276.

 

If you are receiving this email from SCB outside the UK, please click http://www.standardchartered.com/global/email_disclaimer.html to refer to the information on other jurisdictions.


Re: Customizing not-found.htm (404 errors for htm resources)

Posted by Bob Schellink <sa...@gmail.com>.
Hi Sirl,

There are some docs about not-found.htm here:
http://click.sourceforge.net/docs/pages.html#page-not-found

You are correct in that the path not-found.htm cannot be changed. 
Guess this can be called convention over configuration. But you are 
free to change the content of the template not-found.htm, Click won't 
override your custom changes.

Http status codes are handled by the servlet spec, Click does not 
repeat this functionality. An example 404 in web.xml:

<error-page>
     <error-code>404</error-code>
     <location>/Errorpage.htm</location>
</error-page>

Let us know if this helps.

kind regards

bob


Davis, Sirl wrote:
> Hi,
> 
>  
> 
> I’d like to provide my own custom page for not-found.htm, however in the 
> ConfigService class, /click/not-found.htm is defined as static final so 
> it does not appear possible to change?  Also, I've added an error page 
> for all other errors as suggested by the FAQ, '8. Error Handling' for 
> htm files.  However, that does not handle 404 (not found pages).
> 
>  
> 
> Are there any suggestions for a solution to provide my own not-found.htm 
> file?
> 
>  
> 
> Regards,
> 
>  
> 
> Sirl
> 
> This email and any attachments are confidential and may also be privileged.  If you are not the addressee, do not disclose, copy, circulate or in any other way use or rely on the information contained in this email or any attachments.  If received in error, notify the sender immediately and delete this email and any attachments from your system.  Emails cannot be guaranteed to be secure or error free as the message and any attachments could be intercepted, corrupted, lost, delayed, incomplete or amended.  Standard Chartered PLC and its subsidiaries do not accept liability for damage caused by this email or any attachments and may monitor email traffic.
> 
>  
> 
> Standard Chartered PLC is incorporated in England with limited liability under company number 966425 and has its registered office at 1 Aldermanbury Square, London, EC2V 7SB.
> 
>  
> 
> Standard Chartered Bank ("SCB") is incorporated in England with limited liability by Royal Charter 1853, under reference ZC18.  The Principal Office of SCB is situated in England at 1 Aldermanbury Square, London EC2V 7SB. In the United Kingdom, SCB is authorised and regulated by the Financial Services Authority under FSA register number 114276.
> 
>  
> 
> If you are receiving this email from SCB outside the UK, please click http://www.standardchartered.com/global/email_disclaimer.html to refer to the information on other jurisdictions.
> 
>