Wilson,
I think you can define error pages in Tomcat/Jboss. If you're running
Apache in front of Tomcat/Jboss you can define error pages there as well.
Regards,
Bart
Steven Grijzenhout wrote:
Wilson,
I just realised you are using JSP instead of cocoon. My bad
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven
Grijzenhout
Sent: vrijdag 8 augustus 2008 11:38
To: Hippo CMS development public mailinglist
Subject: RE: [HippoCMS-dev] Customized error page
Hi Wilson,
This can be done quite simple.
Add an exception generator at the top of your sitemap:
<map:generator name="exception"
src="org.apache.cocoon.generation.ExceptionGenerator"/>
Then at the bottom of your pipelines you can add this which handles the
exceptions. If you add it just above </map:pipelines> it will be the
default error handler for the whole sitemap.
<map:handle-errors when="always">
<map:generate type="exception"/>
<map:transform src="transformers/templates/errorpage.xsl"/>
<map:serialize type="xhtml" status-code="404"/>
</map:handle-errors>
In the xsl you can import your existing layout and styles and style.
This is a simple example, but you can also define correct status codes,
for example:
<map:select type="exception">
<map:when test="not-found">
<map:serialize type="xhtml" status-code="404"/>
</map:when>
<map:otherwise>
<map:serialize type="xhtml" status-code="500"/>
</map:otherwise>
</map:select>
For more information you can visit
http://cocoon.apache.org/2.1/userdocs/concepts/errorhandling.html
Regards,
Steven
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Wilson de
Paula Pedro Junior
Sent: donderdag 7 augustus 2008 12:51
To: Hippo CMS development public mailinglist
Subject: [HippoCMS-dev] Customized error page
Hi,
How can I customize an http 500 error page?
Like this one:
HTTP ERROR: 500
nl.hippo.client.api.DocumentNotFoundException: Document not found:
/default/files/default.www/content/nieuws/2008/07/08/JLL-adviseur-Philip
s-voor-High-Tech-Campusd.xml
RequestURI=/live/content/nieuws/2008/07/08/JLL-adviseur-Philips-voor-Hig
h-Tech-Campusd.html
Caused by:
javax.el.ELException: nl.hippo.client.api.DocumentNotFoundException:
Document not found:
/default/files/default.www/content/nieuws/2008/07/08/JLL-adviseur-Philip
s-voor-High-Tech-Campusd.xml
at javax.el.BeanELResolver.getValue(BeanELResolver.java:266)
at
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)...
We want to catch it's message and display it in a page with de website
style.
Thanks,
Wilson
********************************************
Hippocms-dev: Hippo CMS development public mailinglist
Searchable archives can be found at:
MarkMail: http://hippocms-dev.markmail.org
Nabble: http://www.nabble.com/Hippo-CMS-f26633.html
********************************************
Hippocms-dev: Hippo CMS development public mailinglist
Searchable archives can be found at:
MarkMail: http://hippocms-dev.markmail.org
Nabble: http://www.nabble.com/Hippo-CMS-f26633.html
********************************************
Hippocms-dev: Hippo CMS development public mailinglist
Searchable archives can be found at:
MarkMail: http://hippocms-dev.markmail.org
Nabble: http://www.nabble.com/Hippo-CMS-f26633.html
--
Hippo B.V. - Amsterdam
Oosteinde 11, 1017 WT, Amsterdam, +31(0)20-5224466
Hippo USA Inc. - San Francisco
101 H Street, Suite Q, Petaluma CA, 94952-3329, +1 (707) 773-4646
-----------------------------------------------------------------
http://www.onehippo.com - [EMAIL PROTECTED]
-----------------------------------------------------------------
********************************************
Hippocms-dev: Hippo CMS development public mailinglist
Searchable archives can be found at:
MarkMail: http://hippocms-dev.markmail.org
Nabble: http://www.nabble.com/Hippo-CMS-f26633.html