阎罗王重生光明法师,恋老 社区门户,辽宁旅游政务网
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>
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!!
点击进行留言回复
网友评论