jsp另外五大内置对象之response-操作重定向
2017-02-21 05:04
351 查看
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<%@ page import="java.util.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<%
// 重定向,客户端跳转
response.sendRedirect("index.html");
%>
</body>
</html>
index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
Hello 主页
</body>
</html>
pageEncoding="utf-8"%>
<%@ page import="java.util.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<%
// 重定向,客户端跳转
response.sendRedirect("index.html");
%>
</body>
</html>
index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
Hello 主页
</body>
</html>
相关文章推荐
- jsp另外五大内置对象之response-操作cookie
- jsp另外五大内置对象之response-设置头信息
- jsp另外五大内置对象之-exception
- jsp内置对象out、request、response、session、application五大常用对象以及Page、pageContext、exception、config
- jsp另外五大内置对象之config
- jsp另外五大内置对象之-out获取缓冲区大小
- jsp另外五大内置对象之out输出
- JSP内置对象----response
- 02_05 JSP内置对象之response
- JSP内置对象:Request和Response的简单介绍及使用
- jsp内置对象*response
- JSP内置对象之------response、session、application
- JSP内置对象:Request和Response的简单介绍及使用
- JSP内置对象的使用 request,response,session(一)
- JSP内置对象response与session 基础知识复习
- jsp小结15 - 9个内置对象08 response
- JSP内置对象二(response和session对象)
- JSP内置对象详解2 之 response内置对象
- JSP内置对象之--response登录验证
- 简简单单----(五)jsp内置对象response