forward error page(JSP)
来源:互联网 发布:mac war解压工具 编辑:程序博客网 时间:2024/05/12 04:49
需要forward的页面:
<%@ page c
language="java" import="java.sql.*,javax.servlet.*,javax.servlet.http.*" errorPage="/error.jsp" %>
<%
//这个页面一定会出错。
int i=0;
int j=1;
out.println(j/i);
%>
被forward到的页面:error.jsp
<%@ page c language="java" isErrorPage="true" import="java.io.*"%>
<html>
<head>
<title>出错了!</title>
<meta http-equiv="Content-Type" c>
</head>
<body>
出错了!<br>
发生了以下的错误:
<br><hr><font color=red><hr>
getMessage():<br>
<%=exception.getMessage()%><br><hr>
getLocalizedMessage():<br>
<%=exception.getLocalizedMessage()%><br><hr>
PrintStatckTrace():<br>
<%
StringWriter sw=new StringWriter();
PrintWriter pw=new PrintWriter(sw);
exception.printStackTrace(pw);
out.println(sw);
%><br>
</font></body>
</html>
- forward error page(JSP)
- jsp:forward page=
- JSP 中的 Error Page
- useBean(通过jsp申明对象)、 包含(include )、 <jsp:forward page="转发的页面>
- jsp中<jsp:forward page=""/>和response.sendRedirect("")两种跳转的区别
- jsp中<jsp:forward page=""/>和response.sendRedirect("")两种跳转的区别
- jsp中<jsp:forward page=""/>和response.sendRedirect("")两种跳转的区别
- 35 JSP语法 Page ForWard JSP内置对象
- jsp common PopUp Error Page
- error-page和jsp-config
- Struts2中<jsp:forward page="xxx.action"></jsp:forward>失效
- Struts2中<jsp:forward page="xxx.action"></jsp:forward>失效,3种解决方案
- JSP入门命令--page、include、forward指令小结
- spring-boot jsp whitelabel error page问题解决
- <jsp:forward>
- JSF: JSF page and common servlet/jsp communication summary (redirect and forward)
- JSP学习笔记1(声明,输出表达式,脚本,page,include,forward,usebean,setproperty,getproperty)
- <jsp:forward page="hello.htm" />与response.sendRedirect("hello.htm")跳转
- 导出GridView到Excel
- java 卸载动态链接库
- [转贴] 中文字号与磅的关系
- 超市经营数据分析举要
- sql
- forward error page(JSP)
- [转]正则表达式30分钟入门教程
- 创建sql server 2000的 bat
- 灰尘
- C++设计模式13:Template Method 模式
- Invalid postback or callback argument
- 谋划(13)
- 请教自定义的组策略为什么不起作用!
- [转]有很多人不明白什么是“软件开发”http://bbs.sz84.net/showtopic-1825.aspx