JSP page指令 关于isErrorPage指定错误页面的使用
来源:互联网 发布:阿里云更换操作系统 编辑:程序博客网 时间:2024/06/06 02:16
isErrorPage 指令用来指定当前JSP页面是不是异常处理页面。
该属性通常与errorPage属性一起使用。
使用方法:在可能出现错误的页面的page属性中,指定errorPage属性,在处理错误的页面指定isErrorPage属性。
举例:
出现错误的页面:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page errorPage="isErrorPage.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"><title>Insert title here</title></head><body><%int a =10;int b=0;int c=a/b;%></body></html>
处理错误的页面:
<%@ 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"><title>Insert title here</title></head><body>程序发生了错误。</body></html>
isErrorPage属性的值为true或者false,当值为true时说明当前页面就是处理错误的页面。
阅读全文
0 0
- JSP page指令 关于isErrorPage指定错误页面的使用
- 关于jsp页面page指令中errorpage和iserrorpage属性
- JSP中的errorPage与isErrorPage的使用
- JSP中的errorPage与isErrorPage的使用
- JSP页面page指令
- JSP指令标签的练习:errorPage属性和isErrorPage属性
- jsp错误页面导航error page的使用
- jsp错误页面导航error page的使用
- jsp错误页面导航error page的使用
- 指定Jsp的错误页面
- JSP的page指令
- jsp的page指令
- Jsp指令---page(页面)指令
- JSP页面元素简介及page指令
- JSP指向指定的错误页面
- jsp: isErrorPage="true"的作用
- JSP指令--Page指令
- jsp学习6-jsp的page指令
- scp command
- alibaba druid
- mybatis的map传值
- To Install Android Studio in Ubuntu 16.04 and Ubuntu 17.04
- NSUserDefaults 存储可变数组,对象。
- JSP page指令 关于isErrorPage指定错误页面的使用
- ScrollView和RecyclerView嵌套问题
- Linux根目录介绍
- 实现阮一峰ES6的顶部加载条效果
- 重定向用户
- how to extract code of apk file
- lamp源码包安装
- Mars简介
- android 相關網址