JSP_错误提示_友好页面
2021-07-15 20:06
标签:请求转发 w3c 技术分享 sage 转发 lang 错误提示 location ror 示例1:(涉及到请求转发) 1.jsp----------------errorPage="/error.jsp"请求转发不需要写web应用名称 error.jsp 示例 2: web.xml(推荐) JSP_错误提示_友好页面 标签:请求转发 w3c 技术分享 sage 转发 lang 错误提示 location ror 原文地址:http://www.cnblogs.com/dreamHighMjc/p/7072452.html 1 @ page language="java" import="java.util.*" pageEncoding="utf-8" session="false" errorPage="/error.jsp" %>
2 DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3 html>
4 head>
5 head>
6 body>
7 xxxx中文
8
9 int i = 1/0;
10 %>
11 body>
12 html>
1 @ page language="java" import="java.util.*" pageEncoding="utf-8" isErrorPage="true"%>
2 DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3 html>
4 head>
5 head>
6 body>
7 服务器出错了哦...亲~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8 = exception.getMessage() %>
9 body>
10 html>
1 xml version="1.0" encoding="UTF-8"?>
2 web-app version="2.5"
3 xmlns="http://java.sun.com/xml/ns/javaee"
4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
6 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
7
8