Hi Robert,
I guess you mean the admincentral error page upon *some* server errors.
First, it might be worth investigating why you're running into these, as they
should occur rather exceptionally.
Normal exceptions occurring during the Vaadin request lifecycle are caught by
the VaadinService and dispatched to an ErrorHandler.
Regardless, this is how we do it: we override the VaadinServlet, wrap the
#service method merely with a try/catch
[code]@Override
protected void service(HttpServletRequest request, HttpServletResponse
response) throws IOException {
try {
String requestURI =
ServletUtil.stripPathParameters(request.getRequestURI());
if (requestURI != null && requestURI.endsWith("undefined.cache.js")) {
writeUnsupportedBrowserPage(request, response);
} else {
super.service(request, response);
}
} catch (Exception e) {
log.error("An internal error has occurred in the VaadinServlet.", e);
if (!isUidlRequest(request)) { // same as
com.vaadin.server.ServletPortletHelper#isUIDLRequest
writeServerErrorPage(request, response, e);
}
}
}[/code]
Then you're basically hands-free regarding the implementation of
#writeServerErrorPage or #writeUnsupportedBrowserPage, setting response status,
content, headers, invoking a Freemarker template or what have you...
Cheers,
Mika
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=0e685293-da76-4e18-963d-a38713494c15
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------