您需要在web.xml中添加“布局的” jsp。下面是解释代码:
// Your web.xml should look like this:<error-page> <error-pre>404</error-pre> <location>/WEB-INF/error/layout-404.jsp</location></error-page>// Your layout-404.jsp should look like this:<%@page isELIgnored="false" %><%@page contentType="text/html"%><%@taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %><tiles:insertDefinition name="404" />// Your layout def should look like this:<definition name="404" extends="standardLayout"> <put-attribute name="body" value="/WEB-INF/error/404.jsp" /></definition>



