当前位置:网站首页>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>
边栏推荐
猜你喜欢
随机推荐
Axure tutorial - the new base (small white strongly recommended!!!)
多御安全浏览器android版更新至1.7,改进加密协议
07-SDRAM :FIFO控制模块
JSP request对象功能详解说明
security session concurrency management
【Leetcode】478. Generate Random Point in a Circle(配数学证明)
认识USB、Type-C、闪电、雷电接口
QML包管理
Is TCP reliable?Why?
【三子棋】C语言实现简易三子棋
security跨域配置
如何优雅的消除系统重复代码
在不完全恢复、控制文件被创建或还原后,必须使用 RESETLOGS 打开数据库,解释 RESETLOGS.
【解决】win10下emqx启动报错Unable to load emulator DLL、node.db_role = EMQX_NODE__DB_ROLE = core
Interview high-frequency test questions solution - stack push and pop sequence, effective parentheses, reverse Polish expression evaluation
Thymeleaf简介
06-SDRAM :SDRAM控制模块
解析正则表达式的底层实现原理
很多人喜欢用多御安全浏览器,竟是因为这些原因
asyncawait和promise的区别