当前位置:网站首页>JSP page指令errorPage属性起什么作用呢?
JSP page指令errorPage属性起什么作用呢?
2022-08-02 00:01:00 【qq_25073223】
转自:
下文讲述JSP中page指令的errorPage功能简介说明,如下所示:
errorPage功能: errorPage 属性用于设置JSP页面,当出现异常时的跳转页面 注意事项: errorPage和isErrorPage属性需一起使用,用于指定错误页 errorPage属性:指定错误出现时要跳转的页面 isErrorPage属性:设置该页面是错误页
例:
会错误的页面 <%@ page language="java" contentType="text/html" pageEncoding="GBK"%> <%@ page errorPage="error.jsp"%> <html> <head> <title>test errorPage</title> </head> <body> <center><h2>errorPage属性测试</h2></center> </body> </html> ------------------------------------------------------------------------------------------------------------ error.jsp:错误处理页 <%@ page language="java" contentType="text/html" pageEncoding="GBK"%> <%@ page isErrorPage="true"%><%--表示该页面是错误页 --%> <html> <head> <title>test isErrorPage</title> </head> <body> <center><h2>isErrorPage属性测试</h2></center> </body> </html>
边栏推荐
- 20220725 Information update
- 06-SDRAM :SDRAM控制模块
- Deliver cloud-native microservices applications with Zadig
- Bean的生命周期
- 在CentOS下安装MySQL
- security cross-domain configuration
- 以交易为生是一种什么体验?
- After an incomplete recovery, the control file has been created or restored, the database must be opened with RESETLOGS, interpreting RESETLOGS.
- Short video SEO optimization tutorial Self-media SEO optimization skills and methods
- security跨域配置
猜你喜欢
随机推荐
微软电脑管家V2.1公测版正式发布
An overview of the most useful DeFi tools
控制电机的几种控制电路原理图
当奈飞的NFT忘记了Web2的业务安全
Thinkphp 5.0.24变量覆盖漏洞导致RCE分析
22.支持向量机—高斯核函数
很多人喜欢用多御安全浏览器,竟是因为这些原因
Short video SEO optimization tutorial Self-media SEO optimization skills and methods
mysql8安装make报错如何解决
检查 Oracle 版本的 7 种方法
Bean的生命周期
An interesting project--Folder comparison tool (1)
利用“栈”快速计算——逆波兰表达式
security跨域配置
JSP out.println()方法具有什么功能呢?
async/await 原理及执行顺序分析
【图像融合】基于加权和金字塔实现图像融合附matlab代码
在CentOS下安装MySQL
Axure tutorial - the new base (small white strongly recommended!!!)
面试必问的HashCode技术内幕









