Java基础编程2—jsp错误页面
来源:互联网 发布:西澳大学数据科学好吗 编辑:程序博客网 时间:2024/05/22 14:32
web.xml
<?xml version="1.0" encoding="UTF-8"?><web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"><!-- 统一错误页面去处 --><error-page><error-code>404</error-code><location>/error.jsp</location></error-page><error-page><error-code>500</error-code><location>/error.jsp</location></error-page></web-app>
error.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isErrorPage="true"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link href="images/favicon.ico" type="image/x-icon" rel="shortcut icon" /><title>ERROR</title><style type="text/css">img {display:block;margin:auto;vertical-align:middle;}a {display:block;margin:auto;text-align:center;vertical-align:middle;margin-top:-90px;}</style></head><body><div style="margin-top:100px; width: 100%; height: 100%;"><img src="images/error.png"/><a href="index.jsp">返回登陆页面吧,ZZ!</a></div></body></html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" errorPage="error.jsp"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link href="images/favicon.ico" type="image/x-icon" rel="shortcut icon" /><title>TEST ERROR</title></head><body><jsp:forward page="tozz.jsp"></jsp:forward></body></html>
阅读全文
1 0
- Java基础编程2—jsp错误页面
- java web3 jsp编程基础
- Java EE JSP编程基础
- java web 错误页面和jsp跳转
- JSP自定义错误页面
- jsp 错误页面跳转
- JSP配置错误页面
- jsp自定义错误页面
- 配置Jsp错误页面
- jsp错误页面处理
- 《Java Web 程序设计与开发》读书笔记——JSP编程基础和JSP内置对象
- Jsp页面基础语法
- jsp 基础页面
- java web 自定义错误页面 完整jsp错误页面代码(同时写错误日志) error.jsp
- java web 自定义错误页面 完整jsp错误页面代码(同时写错误日志) error.jsp
- java,jsp错误页面在web.xml中的设置
- JSP JAVA 自定义 错误页面(404,505,500)
- 前台JSP页面编程
- 二进制形成集合的子集
- 指针函数、数组指针、函数指针、函数指针数组和指向函数指针数组的指针
- 实习(二)
- 阿里云服务器ECS问题总结
- ngnix安装
- Java基础编程2—jsp错误页面
- Set接口中的HashSet与LinkedHashSet
- RDD、DataFrame和DataSet的区别
- VS中用MessageBox显示string变量
- IT圈剁手指南:谁说程序猿不败家_说出来吓死你
- 微信小程序选项卡数组列表单项选择切换效果
- 什么样的sql不走索引
- 解析UML类图符号意义
- Sass的@each指令