show.jsp
<%@ page language= "java" contenttype= "text/html" pageencoding= "utf-8"%><%@ page errorpage= "error.jsp"%> int result = 10/0; %> </body>
error.jsp
<%@ page language= "java" contenttype= "text/html" pageencoding= "utf-8"%><%@ page iserrorpage= "true"%>< html>
Sometimes there is a problem that cannot jump. After jumping to think that error.jsp is also an error page. The error.jsp is the normal page, depending on the response to set the status code.
<%@ page language= "java" contenttype= "text/html" pageencoding= "utf-8"%><%@ page iserrorpage= "true"%>< html> <% Response.setstatus ($); %>
Now the address bar has not changed, still show.jsp but the content has changed. The address bar does not change the jump to become a server-side jump.
404 and 505 Error or program exception: NullPointerException, want to focus on these issues, modify the virtual directory of the Web. xml file--centralized Jump
Modify the virtual directory and restart the server after the configuration is complete. When the configuration is complete, you will be prompted with an error message when you enter any address.
After the detection or delete the configuration, or any subsequent errors directly jump to see the wrong location and reason.
JSP page instruction error pages jump