This trick no longer works with Magnolia 3:
http://www.magnolia.info/wiki/Wiki.jsp?page=Setup404Handler
It does something though. If I set up web.xml to this:
<error-page>
<error-code>404</error-code>
<location>/</location>
</error-page>
It gives me a directory listing (ooh bad).
If I give it a jsp template like the one at the bottom of this email
it doesn't load. The catalina.log says:
ERROR info.magnolia.context.MgnlContext MgnlContext.java(getInstance:
289) 01.03.2007 17:23:11 MgnlContext is not initialized, This could
happen if the request does not go through magnolia default filters
I noticed an email in the user list archives about filters and 404,
but I have no idea what filters are. Can someone explain how to make
a custom 404 page in Magnolia 3?
--
Thanks,
James Reynolds - University of Utah - Student Computing Labs -
801-585-9811
james(a)scl.utah.edu - james(a)magnusviri.com - http://
james.magnusviri.com
<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="urn:jsptld:http://java.sun.com/jsp/jstl/core"
xmlns:fmt="urn:jsptld:http://java.sun.com/jsp/jstl/fmt"
xmlns:cms="urn:jsptld:cms-taglib">
<jsp:directive.page contentType="text/html; charset=UTF-8" />
<html>
<head>
<title>404 Error</title>
<cms:links adminOnly="false" />
</head>
<body class="mgnlBgLight">
<h3>404 Error</h3>
<jsp:scriptlet>
response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
String contextName = request.getContextPath();
String newLocn = contextName + "/404.html";
response.setHeader("Location",newLocn);
</jsp:scriptlet>
</body>
</html>
</jsp:root>
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------