When you incorrectly format a widget template file (xhtml), the error page is not generated correctly. See the error message from jboss below.
This is repeatable by removing a quote from the last tag of an xhtml file in a template file that is called by a given webpage.
HTTP Status 404 - /nuxeo/nxdoc/default/230eef46-5c64-47fd-ac9b-c5ccdc89e0f4//nuxeo/debug.xhtml
type Status report
message /nuxeo/nxdoc/default/230eef46-5c64-47fd-ac9b-c5ccdc89e0f4//nuxeo/debug.xhtml
description The requested resource (/nuxeo/nxdoc/default/230eef46-5c64-47fd-ac9b-c5ccdc89e0f4//nuxeo/debug.xhtml) is not available.