There is a possibly "tricky" solution: you can make redirect from cocoon stacktrace page.

i.e., you can add JS redirect if exception class matches ResourceNotFoundException
this can be done in exception page stylesheet ({$dspace_dir/webapps/xmlui/exception2html.xslt)

<xsl:if test="contains(@class, 'ResourceNotFoundException')">
             <script><xsl:text disable-output-escaping="yes"><![CDATA[ location.replace("NOT FOUND PAGE URL");]]></xsl:text></script>
</xsl:if>

Another way that I see is to restyle cocoon stacktrace page but this is too laborious way)


2013/2/8 helix84 <helix84@centrum.sk>
On Thu, Feb 7, 2013 at 6:02 PM, Thomas  Misilo <misilot@fit.edu> wrote:
> I was wondering if anyone could point me in the right direction to maybe
> improving the 404 page for XMLUI?
>
> Currently it just throws a :org.apache.cocoon.ResourceNotFoundException:
> Page cannot be found
>
> Which isn’t very nice. I would like one similar to the one in JSPUI, where
> it keeps the them and updates the body with an error message such as Error:
> Document not found, or invalid identifier.

Hi Thomas,

XMLUI at once did display friendly errors, but those error pages were
sent with HTTP response code 200, not 404, which caused a lot of
problems, obviously. When this was changed, the friendly errors
functionality was lost for some reason.

See more here:

https://jira.duraspace.org/browse/DS-768
https://jira.duraspace.org/browse/DS-2

There might be some hard to solve problem there, but you're welcome to try.


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette



--
С уважением, Владимир Лебедев.