JSP errorPage设置方法

网络编程 发布日期:2024/10/20 浏览次数:1

正在浏览:JSP errorPage设置方法
1.设置errorPage:errorPage.jsp
复制代码 代码如下:
<%@page isErrorPage="true"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
Error~!
<%=exception.getMessage()%>
</body>
</html>

2.应用
复制代码 代码如下:
<%@page info="Bad page"%>
<%@page errorPage="errorPage.jsp" %> //出错后转到
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<%
boolean tf = true;
if(tf){
String info = getServletInfo();
throw new Exception("Exception in:" + info);
}
%>
</body>
</html>
Windows上运行安卓你用过了吗
在去年的5月23日,借助Intel Bridge Technology以及Intel Celadon两项技术的驱动,Intel为PC用户带来了Android On Windows(AOW)平台,并携手国内软件公司腾讯共同推出了腾讯应用宝电脑版,将Windows与安卓两大生态进行了融合,PC的使用体验随即被带入到了一个全新的阶段。